candidhealth 0.40.1 → 0.40.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa002f0e711739e36d1f3c510ad27c75a1cf45fc96c4a4dd44081ea3e2b49e5c
4
- data.tar.gz: 29cc8291b41f39e82053b95ab208d80d7773cb7c476f3076ceeeaf0c49e83944
3
+ metadata.gz: 76b8c630a7776561f2352a1fc16254884d3558474c0d33ca8b75bddfc19c1b67
4
+ data.tar.gz: c6970b7ecc9c154cc20f565d7ca7563cb8f4c7beb658a037e7dcc67c5d76fd29
5
5
  SHA512:
6
- metadata.gz: be6292a526e8dba61087eaef8a57390c8f2a867c38352bc95c7e9091af9a8700a1ee4f2b2fa8a6856c15ecd8b268a428717ef9b0b23043ee9687fe1757d72ff4
7
- data.tar.gz: '09721826454fbe3c24231837092e81170fc0112eea585e860da4e39b047ad1c094eb3126bb04cb48175694efdb5dee2bcc4fcad16cc6779d57979d33fa82268f'
6
+ metadata.gz: de4b0801486d89d2e73d6cf4a8b59e7d21a696f2c9bd654251e1db4044393f7594db0a4a31a8f796d17c6745fc88bf5a36585f3116b3276bc389f0a9ae4d88b4
7
+ data.tar.gz: ece09fc7e479f3ad88f17fd12c35a5f8b7cb49d1aadfe0a786df3a654135c2657a0911798278decdaa33c77a4cbf81ea46f8f309a9d87bc6d6e308cce8bb0b90
@@ -5,6 +5,8 @@ require_relative "types/charge_capture_data"
5
5
  require "date"
6
6
  require_relative "types/charge_capture_status"
7
7
  require_relative "types/charge_capture"
8
+ require_relative "types/charge_capture_sort_field"
9
+ require_relative "../../commons/types/sort_direction"
8
10
  require_relative "types/charge_capture_page"
9
11
  require "async"
10
12
 
@@ -660,6 +662,8 @@ module CandidApiClient
660
662
  end
661
663
 
662
664
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
665
+ # @param sort [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureSortField] Defaults to created_at
666
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
663
667
  # @param page_token [String]
664
668
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
665
669
  # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
@@ -668,6 +672,7 @@ module CandidApiClient
668
672
  # This field should not contain PHI.
669
673
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
670
674
  # This date must be the local date in the timezone where the service occurred.
675
+ # @param bundle_id [String] The ID of the charge capture bundle to which this charge capture belongs.
671
676
  # @param exclude_bundled [Boolean] Whether to exclude charge captures which are associated with a charge capture
672
677
  # bundle.
673
678
  # @param request_options [CandidApiClient::RequestOptions]
@@ -676,15 +681,18 @@ module CandidApiClient
676
681
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
677
682
  # api.charge_capture.v_1.get_all(
678
683
  # limit: 1,
684
+ # sort: CREATED_AT,
685
+ # sort_direction: ASC,
679
686
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
680
687
  # patient_external_id: "string",
681
688
  # status: PLANNED,
682
689
  # charge_external_id: "string",
683
690
  # date_of_service: DateTime.parse(2023-01-15),
691
+ # bundle_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
684
692
  # exclude_bundled: true
685
693
  # )
686
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, status: nil, charge_external_id: nil,
687
- date_of_service: nil, exclude_bundled: nil, request_options: nil)
694
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil, status: nil,
695
+ charge_external_id: nil, date_of_service: nil, bundle_id: nil, exclude_bundled: nil, request_options: nil)
688
696
  response = @request_client.conn.get do |req|
689
697
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
690
698
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -696,11 +704,14 @@ module CandidApiClient
696
704
  req.params = {
697
705
  **(request_options&.additional_query_parameters || {}),
698
706
  "limit": limit,
707
+ "sort": sort,
708
+ "sort_direction": sort_direction,
699
709
  "page_token": page_token,
700
710
  "patient_external_id": patient_external_id,
701
711
  "status": status,
702
712
  "charge_external_id": charge_external_id,
703
713
  "date_of_service": date_of_service,
714
+ "bundle_id": bundle_id,
704
715
  "exclude_bundled": exclude_bundled
705
716
  }.compact
706
717
  req.url "#{@request_client.get_url(environment: CandidApi,
@@ -1367,6 +1378,8 @@ module CandidApiClient
1367
1378
  end
1368
1379
 
1369
1380
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
1381
+ # @param sort [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureSortField] Defaults to created_at
1382
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
1370
1383
  # @param page_token [String]
1371
1384
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
1372
1385
  # @param status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
@@ -1375,6 +1388,7 @@ module CandidApiClient
1375
1388
  # This field should not contain PHI.
1376
1389
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
1377
1390
  # This date must be the local date in the timezone where the service occurred.
1391
+ # @param bundle_id [String] The ID of the charge capture bundle to which this charge capture belongs.
1378
1392
  # @param exclude_bundled [Boolean] Whether to exclude charge captures which are associated with a charge capture
1379
1393
  # bundle.
1380
1394
  # @param request_options [CandidApiClient::RequestOptions]
@@ -1383,15 +1397,18 @@ module CandidApiClient
1383
1397
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
1384
1398
  # api.charge_capture.v_1.get_all(
1385
1399
  # limit: 1,
1400
+ # sort: CREATED_AT,
1401
+ # sort_direction: ASC,
1386
1402
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
1387
1403
  # patient_external_id: "string",
1388
1404
  # status: PLANNED,
1389
1405
  # charge_external_id: "string",
1390
1406
  # date_of_service: DateTime.parse(2023-01-15),
1407
+ # bundle_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
1391
1408
  # exclude_bundled: true
1392
1409
  # )
1393
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, status: nil, charge_external_id: nil,
1394
- date_of_service: nil, exclude_bundled: nil, request_options: nil)
1410
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil, status: nil,
1411
+ charge_external_id: nil, date_of_service: nil, bundle_id: nil, exclude_bundled: nil, request_options: nil)
1395
1412
  Async do
1396
1413
  response = @request_client.conn.get do |req|
1397
1414
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -1404,11 +1421,14 @@ module CandidApiClient
1404
1421
  req.params = {
1405
1422
  **(request_options&.additional_query_parameters || {}),
1406
1423
  "limit": limit,
1424
+ "sort": sort,
1425
+ "sort_direction": sort_direction,
1407
1426
  "page_token": page_token,
1408
1427
  "patient_external_id": patient_external_id,
1409
1428
  "status": status,
1410
1429
  "charge_external_id": charge_external_id,
1411
1430
  "date_of_service": date_of_service,
1431
+ "bundle_id": bundle_id,
1412
1432
  "exclude_bundled": exclude_bundled
1413
1433
  }.compact
1414
1434
  req.url "#{@request_client.get_url(environment: CandidApi,
@@ -3,6 +3,7 @@
3
3
  require_relative "charge_capture_status"
4
4
  require_relative "charge_capture_data"
5
5
  require "date"
6
+ require_relative "charge_capture_post_billed_change"
6
7
  require "ostruct"
7
8
  require "json"
8
9
 
@@ -26,6 +27,8 @@ module CandidApiClient
26
27
  # @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
27
28
  # This date must be the local date in the timezone where the service occurred.
28
29
  attr_reader :date_of_service
30
+ # @return [Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange>]
31
+ attr_reader :updates
29
32
  # @return [OpenStruct] Additional properties unmapped to the current class definition
30
33
  attr_reader :additional_properties
31
34
  # @return [Object]
@@ -42,9 +45,10 @@ module CandidApiClient
42
45
  # @param ehr_source_url [String]
43
46
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
44
47
  # This date must be the local date in the timezone where the service occurred.
48
+ # @param updates [Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange>]
45
49
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
46
50
  # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapture]
47
- def initialize(id:, status:, charge_capture_data:, patient_external_id:, charge_external_id:,
51
+ def initialize(id:, status:, charge_capture_data:, patient_external_id:, charge_external_id:, updates:,
48
52
  ehr_source_url: OMIT, date_of_service: OMIT, additional_properties: nil)
49
53
  @id = id
50
54
  @status = status
@@ -53,6 +57,7 @@ module CandidApiClient
53
57
  @charge_external_id = charge_external_id
54
58
  @ehr_source_url = ehr_source_url if ehr_source_url != OMIT
55
59
  @date_of_service = date_of_service if date_of_service != OMIT
60
+ @updates = updates
56
61
  @additional_properties = additional_properties
57
62
  @_field_set = {
58
63
  "id": id,
@@ -61,7 +66,8 @@ module CandidApiClient
61
66
  "patient_external_id": patient_external_id,
62
67
  "charge_external_id": charge_external_id,
63
68
  "ehr_source_url": ehr_source_url,
64
- "date_of_service": date_of_service
69
+ "date_of_service": date_of_service,
70
+ "updates": updates
65
71
  }.reject do |_k, v|
66
72
  v == OMIT
67
73
  end
@@ -86,6 +92,10 @@ module CandidApiClient
86
92
  charge_external_id = struct["charge_external_id"]
87
93
  ehr_source_url = struct["ehr_source_url"]
88
94
  date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
95
+ updates = parsed_json["updates"]&.map do |item|
96
+ item = item.to_json
97
+ CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange.from_json(json_object: item)
98
+ end
89
99
  new(
90
100
  id: id,
91
101
  status: status,
@@ -94,6 +104,7 @@ module CandidApiClient
94
104
  charge_external_id: charge_external_id,
95
105
  ehr_source_url: ehr_source_url,
96
106
  date_of_service: date_of_service,
107
+ updates: updates,
97
108
  additional_properties: struct
98
109
  )
99
110
  end
@@ -119,6 +130,7 @@ module CandidApiClient
119
130
  obj.charge_external_id.is_a?(String) != false || raise("Passed value for field obj.charge_external_id is not the expected type, validation failed.")
120
131
  obj.ehr_source_url&.is_a?(String) != false || raise("Passed value for field obj.ehr_source_url is not the expected type, validation failed.")
121
132
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
133
+ obj.updates.is_a?(Array) != false || raise("Passed value for field obj.updates is not the expected type, validation failed.")
122
134
  end
123
135
  end
124
136
  end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module ChargeCapture
8
+ module V1
9
+ module Types
10
+ # ChargeCapturePostBilledChange represents a change to a ChargeCapture that
11
+ # occurred after the ChargeCapture's status moved to BILLED. Action must be taken
12
+ # to resolve the update, and then the update should be marked as resolved.
13
+ class ChargeCapturePostBilledChange
14
+ # @return [String]
15
+ attr_reader :id
16
+ # @return [String]
17
+ attr_reader :message
18
+ # @return [Boolean]
19
+ attr_reader :resolved
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 id [String]
29
+ # @param message [String]
30
+ # @param resolved [Boolean]
31
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
32
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange]
33
+ def initialize(id:, message:, resolved:, additional_properties: nil)
34
+ @id = id
35
+ @message = message
36
+ @resolved = resolved
37
+ @additional_properties = additional_properties
38
+ @_field_set = { "id": id, "message": message, "resolved": resolved }
39
+ end
40
+
41
+ # Deserialize a JSON object to an instance of ChargeCapturePostBilledChange
42
+ #
43
+ # @param json_object [String]
44
+ # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCapturePostBilledChange]
45
+ def self.from_json(json_object:)
46
+ struct = JSON.parse(json_object, object_class: OpenStruct)
47
+ id = struct["id"]
48
+ message = struct["message"]
49
+ resolved = struct["resolved"]
50
+ new(
51
+ id: id,
52
+ message: message,
53
+ resolved: resolved,
54
+ additional_properties: struct
55
+ )
56
+ end
57
+
58
+ # Serialize an instance of ChargeCapturePostBilledChange to a JSON object
59
+ #
60
+ # @return [String]
61
+ def to_json(*_args)
62
+ @_field_set&.to_json
63
+ end
64
+
65
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
66
+ # hash and check each fields type against the current object's property
67
+ # definitions.
68
+ #
69
+ # @param obj [Object]
70
+ # @return [Void]
71
+ def self.validate_raw(obj:)
72
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
73
+ obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
74
+ obj.resolved.is_a?(Boolean) != false || raise("Passed value for field obj.resolved is not the expected type, validation failed.")
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module ChargeCapture
5
+ module V1
6
+ module Types
7
+ class ChargeCaptureSortField
8
+ CREATED_AT = "created_at"
9
+ DATE_OF_SERVICE = "date_of_service"
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -2,6 +2,9 @@
2
2
 
3
3
  require_relative "../../../requests"
4
4
  require_relative "types/charge_capture_bundle"
5
+ require_relative "types/charge_capture_bundle_summary"
6
+ require_relative "types/charge_capture_bundle_sort_field"
7
+ require_relative "../../commons/types/sort_direction"
5
8
  require_relative "types/charge_capture_bundle_status"
6
9
  require_relative "../../charge_capture/v_1/types/charge_capture_status"
7
10
  require "date"
@@ -42,6 +45,26 @@ module CandidApiClient
42
45
  CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle.from_json(json_object: response.body)
43
46
  end
44
47
 
48
+ # @param request_options [CandidApiClient::RequestOptions]
49
+ # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSummary]
50
+ # @example
51
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
52
+ # api.charge_capture_bundles.v_1.get_summary
53
+ def get_summary(request_options: nil)
54
+ response = @request_client.conn.get do |req|
55
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
56
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
57
+ req.headers = {
58
+ **(req.headers || {}),
59
+ **@request_client.get_headers,
60
+ **(request_options&.additional_headers || {})
61
+ }.compact
62
+ req.url "#{@request_client.get_url(environment: CandidApi,
63
+ request_options: request_options)}/api/charge_capture_bundle/v1/summary"
64
+ end
65
+ CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSummary.from_json(json_object: response.body)
66
+ end
67
+
45
68
  # @param charge_capture_bundle_id [String]
46
69
  # @param request_options [CandidApiClient::RequestOptions]
47
70
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
@@ -64,6 +87,8 @@ module CandidApiClient
64
87
  end
65
88
 
66
89
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
90
+ # @param sort [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSortField] Defaults to created_at
91
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
67
92
  # @param page_token [String]
68
93
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
69
94
  # @param bundle_status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] the status of the charge capture bundle, refers to whether it was able to create
@@ -74,21 +99,27 @@ module CandidApiClient
74
99
  # This field should not contain PHI.
75
100
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
76
101
  # This date must be the local date in the timezone where the service occurred.
102
+ # @param has_charge_capture_updates [Boolean] If true, only return bundles that have charge captures that have been updated
103
+ # since the bundle has had a status of BILLED. See the updates property on
104
+ # ChargeCapture for more details.
77
105
  # @param request_options [CandidApiClient::RequestOptions]
78
106
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
79
107
  # @example
80
108
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
81
109
  # api.charge_capture_bundles.v_1.get_all(
82
110
  # limit: 1,
111
+ # sort: CREATED_AT,
112
+ # sort_direction: ASC,
83
113
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
84
114
  # patient_external_id: "string",
85
- # bundle_status: IN_PROGRESS,
115
+ # bundle_status: NOT_STARTED,
86
116
  # charge_status: PLANNED,
87
117
  # charge_external_id: "string",
88
- # date_of_service: DateTime.parse(2023-01-15)
118
+ # date_of_service: DateTime.parse(2023-01-15),
119
+ # has_charge_capture_updates: true
89
120
  # )
90
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, bundle_status: nil, charge_status: nil,
91
- charge_external_id: nil, date_of_service: nil, request_options: nil)
121
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil,
122
+ bundle_status: nil, charge_status: nil, charge_external_id: nil, date_of_service: nil, has_charge_capture_updates: nil, request_options: nil)
92
123
  response = @request_client.conn.get do |req|
93
124
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
94
125
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -100,12 +131,15 @@ module CandidApiClient
100
131
  req.params = {
101
132
  **(request_options&.additional_query_parameters || {}),
102
133
  "limit": limit,
134
+ "sort": sort,
135
+ "sort_direction": sort_direction,
103
136
  "page_token": page_token,
104
137
  "patient_external_id": patient_external_id,
105
138
  "bundle_status": bundle_status,
106
139
  "charge_status": charge_status,
107
140
  "charge_external_id": charge_external_id,
108
- "date_of_service": date_of_service
141
+ "date_of_service": date_of_service,
142
+ "has_charge_capture_updates": has_charge_capture_updates
109
143
  }.compact
110
144
  req.url "#{@request_client.get_url(environment: CandidApi,
111
145
  request_options: request_options)}/api/charge_capture_bundle/v1"
@@ -147,6 +181,28 @@ module CandidApiClient
147
181
  end
148
182
  end
149
183
 
184
+ # @param request_options [CandidApiClient::RequestOptions]
185
+ # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSummary]
186
+ # @example
187
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
188
+ # api.charge_capture_bundles.v_1.get_summary
189
+ def get_summary(request_options: nil)
190
+ Async do
191
+ response = @request_client.conn.get do |req|
192
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
193
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
194
+ req.headers = {
195
+ **(req.headers || {}),
196
+ **@request_client.get_headers,
197
+ **(request_options&.additional_headers || {})
198
+ }.compact
199
+ req.url "#{@request_client.get_url(environment: CandidApi,
200
+ request_options: request_options)}/api/charge_capture_bundle/v1/summary"
201
+ end
202
+ CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSummary.from_json(json_object: response.body)
203
+ end
204
+ end
205
+
150
206
  # @param charge_capture_bundle_id [String]
151
207
  # @param request_options [CandidApiClient::RequestOptions]
152
208
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
@@ -171,6 +227,8 @@ module CandidApiClient
171
227
  end
172
228
 
173
229
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
230
+ # @param sort [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSortField] Defaults to created_at
231
+ # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
174
232
  # @param page_token [String]
175
233
  # @param patient_external_id [String] The patient ID from the external EMR platform for the patient
176
234
  # @param bundle_status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] the status of the charge capture bundle, refers to whether it was able to create
@@ -181,21 +239,27 @@ module CandidApiClient
181
239
  # This field should not contain PHI.
182
240
  # @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
183
241
  # This date must be the local date in the timezone where the service occurred.
242
+ # @param has_charge_capture_updates [Boolean] If true, only return bundles that have charge captures that have been updated
243
+ # since the bundle has had a status of BILLED. See the updates property on
244
+ # ChargeCapture for more details.
184
245
  # @param request_options [CandidApiClient::RequestOptions]
185
246
  # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
186
247
  # @example
187
248
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
188
249
  # api.charge_capture_bundles.v_1.get_all(
189
250
  # limit: 1,
251
+ # sort: CREATED_AT,
252
+ # sort_direction: ASC,
190
253
  # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
191
254
  # patient_external_id: "string",
192
- # bundle_status: IN_PROGRESS,
255
+ # bundle_status: NOT_STARTED,
193
256
  # charge_status: PLANNED,
194
257
  # charge_external_id: "string",
195
- # date_of_service: DateTime.parse(2023-01-15)
258
+ # date_of_service: DateTime.parse(2023-01-15),
259
+ # has_charge_capture_updates: true
196
260
  # )
197
- def get_all(limit: nil, page_token: nil, patient_external_id: nil, bundle_status: nil, charge_status: nil,
198
- charge_external_id: nil, date_of_service: nil, request_options: nil)
261
+ def get_all(limit: nil, sort: nil, sort_direction: nil, page_token: nil, patient_external_id: nil,
262
+ bundle_status: nil, charge_status: nil, charge_external_id: nil, date_of_service: nil, has_charge_capture_updates: nil, request_options: nil)
199
263
  Async do
200
264
  response = @request_client.conn.get do |req|
201
265
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -208,12 +272,15 @@ module CandidApiClient
208
272
  req.params = {
209
273
  **(request_options&.additional_query_parameters || {}),
210
274
  "limit": limit,
275
+ "sort": sort,
276
+ "sort_direction": sort_direction,
211
277
  "page_token": page_token,
212
278
  "patient_external_id": patient_external_id,
213
279
  "bundle_status": bundle_status,
214
280
  "charge_status": charge_status,
215
281
  "charge_external_id": charge_external_id,
216
- "date_of_service": date_of_service
282
+ "date_of_service": date_of_service,
283
+ "has_charge_capture_updates": has_charge_capture_updates
217
284
  }.compact
218
285
  req.url "#{@request_client.get_url(environment: CandidApi,
219
286
  request_options: request_options)}/api/charge_capture_bundle/v1"
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module ChargeCaptureBundles
5
+ module V1
6
+ module Types
7
+ class ChargeCaptureBundleSortField
8
+ CREATED_AT = "created_at"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -5,9 +5,11 @@ module CandidApiClient
5
5
  module V1
6
6
  module Types
7
7
  class ChargeCaptureBundleStatus
8
+ NOT_STARTED = "not-started"
8
9
  IN_PROGRESS = "in-progress"
9
10
  IN_ERROR = "in-error"
10
11
  SUCCESSFUL = "successful"
12
+ SUCCESSFUL_DRY_RUN = "successful-dry-run"
11
13
  ABORTED = "aborted"
12
14
  end
13
15
  end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module ChargeCaptureBundles
8
+ module V1
9
+ module Types
10
+ class ChargeCaptureBundleSummary
11
+ # @return [Integer] The count of charge captures which are not bundled.
12
+ attr_reader :charge_capture_unbundled_count
13
+ # @return [Integer] The count of charge capture bundles that are in an error state.
14
+ attr_reader :charge_capture_bundles_in_error_count
15
+ # @return [Integer] The number of ChargeCapturePostBilledChange items that are unresolved.
16
+ attr_reader :charge_capture_unresolved_change_count
17
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
18
+ attr_reader :additional_properties
19
+ # @return [Object]
20
+ attr_reader :_field_set
21
+ protected :_field_set
22
+
23
+ OMIT = Object.new
24
+
25
+ # @param charge_capture_unbundled_count [Integer] The count of charge captures which are not bundled.
26
+ # @param charge_capture_bundles_in_error_count [Integer] The count of charge capture bundles that are in an error state.
27
+ # @param charge_capture_unresolved_change_count [Integer] The number of ChargeCapturePostBilledChange items that are unresolved.
28
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
+ # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSummary]
30
+ def initialize(charge_capture_unbundled_count:, charge_capture_bundles_in_error_count:,
31
+ charge_capture_unresolved_change_count:, additional_properties: nil)
32
+ @charge_capture_unbundled_count = charge_capture_unbundled_count
33
+ @charge_capture_bundles_in_error_count = charge_capture_bundles_in_error_count
34
+ @charge_capture_unresolved_change_count = charge_capture_unresolved_change_count
35
+ @additional_properties = additional_properties
36
+ @_field_set = {
37
+ "charge_capture_unbundled_count": charge_capture_unbundled_count,
38
+ "charge_capture_bundles_in_error_count": charge_capture_bundles_in_error_count,
39
+ "charge_capture_unresolved_change_count": charge_capture_unresolved_change_count
40
+ }
41
+ end
42
+
43
+ # Deserialize a JSON object to an instance of ChargeCaptureBundleSummary
44
+ #
45
+ # @param json_object [String]
46
+ # @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleSummary]
47
+ def self.from_json(json_object:)
48
+ struct = JSON.parse(json_object, object_class: OpenStruct)
49
+ charge_capture_unbundled_count = struct["charge_capture_unbundled_count"]
50
+ charge_capture_bundles_in_error_count = struct["charge_capture_bundles_in_error_count"]
51
+ charge_capture_unresolved_change_count = struct["charge_capture_unresolved_change_count"]
52
+ new(
53
+ charge_capture_unbundled_count: charge_capture_unbundled_count,
54
+ charge_capture_bundles_in_error_count: charge_capture_bundles_in_error_count,
55
+ charge_capture_unresolved_change_count: charge_capture_unresolved_change_count,
56
+ additional_properties: struct
57
+ )
58
+ end
59
+
60
+ # Serialize an instance of ChargeCaptureBundleSummary to a JSON object
61
+ #
62
+ # @return [String]
63
+ def to_json(*_args)
64
+ @_field_set&.to_json
65
+ end
66
+
67
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
68
+ # hash and check each fields type against the current object's property
69
+ # definitions.
70
+ #
71
+ # @param obj [Object]
72
+ # @return [Void]
73
+ def self.validate_raw(obj:)
74
+ obj.charge_capture_unbundled_count.is_a?(Integer) != false || raise("Passed value for field obj.charge_capture_unbundled_count is not the expected type, validation failed.")
75
+ obj.charge_capture_bundles_in_error_count.is_a?(Integer) != false || raise("Passed value for field obj.charge_capture_bundles_in_error_count is not the expected type, validation failed.")
76
+ obj.charge_capture_unresolved_change_count.is_a?(Integer) != false || raise("Passed value for field obj.charge_capture_unresolved_change_count is not the expected type, validation failed.")
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -4,6 +4,9 @@ module CandidApiClient
4
4
  module Commons
5
5
  module Types
6
6
  class ProcedureModifier
7
+ AV = "AV"
8
+ AU = "AU"
9
+ AW = "AW"
7
10
  TWENTY_TWO = "22"
8
11
  TWENTY_THREE = "23"
9
12
  TWENTY_FOUR = "24"
@@ -113,7 +113,7 @@ module CandidApiClient
113
113
  # network_types: PPO,
114
114
  # payer_plan_group_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
115
115
  # cpt_code: "string",
116
- # modifiers: TWENTY_TWO
116
+ # modifiers: AV
117
117
  # )
118
118
  def get_multi(page_token: nil, limit: nil, active_date: nil, payer_uuid: nil,
119
119
  organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, payer_plan_group_ids: nil, cpt_code: nil, modifiers: nil, request_options: nil)
@@ -181,7 +181,7 @@ module CandidApiClient
181
181
  # network_types: PPO,
182
182
  # payer_plan_group_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
183
183
  # cpt_code: "string",
184
- # modifiers: TWENTY_TWO
184
+ # modifiers: AV
185
185
  # )
186
186
  def get_unique_values_for_dimension(pivot_dimension:, page_token: nil, limit: nil, payer_uuid: nil,
187
187
  organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, payer_plan_group_ids: nil, cpt_code: nil, modifiers: nil, request_options: nil)
@@ -470,7 +470,7 @@ module CandidApiClient
470
470
  # network_types: PPO,
471
471
  # payer_plan_group_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
472
472
  # cpt_code: "string",
473
- # modifiers: TWENTY_TWO
473
+ # modifiers: AV
474
474
  # )
475
475
  def get_multi(page_token: nil, limit: nil, active_date: nil, payer_uuid: nil,
476
476
  organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, payer_plan_group_ids: nil, cpt_code: nil, modifiers: nil, request_options: nil)
@@ -540,7 +540,7 @@ module CandidApiClient
540
540
  # network_types: PPO,
541
541
  # payer_plan_group_ids: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
542
542
  # cpt_code: "string",
543
- # modifiers: TWENTY_TWO
543
+ # modifiers: AV
544
544
  # )
545
545
  def get_unique_values_for_dimension(pivot_dimension:, page_token: nil, limit: nil, payer_uuid: nil,
546
546
  organization_billing_provider_id: nil, states: nil, zip_codes: nil, license_types: nil, facility_type_codes: nil, network_types: nil, payer_plan_group_ids: nil, cpt_code: nil, modifiers: nil, request_options: nil)
@@ -5,9 +5,6 @@ require_relative "types/insurance_payment_sort_field"
5
5
  require_relative "../../commons/types/sort_direction"
6
6
  require_relative "types/insurance_payments_page"
7
7
  require_relative "types/insurance_payment"
8
- require_relative "types/insurance_payment_create"
9
- require "date"
10
- require_relative "../../financials/types/note_update"
11
8
  require "async"
12
9
 
13
10
  module CandidApiClient
@@ -97,97 +94,6 @@ module CandidApiClient
97
94
  end
98
95
  CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body)
99
96
  end
100
-
101
- # Creates a new insurance payment record and returns the newly created
102
- # `InsurancePayment` object. This endpoint
103
- # should only be used for insurance payments that do not have a corresponding ERA
104
- # (for example: a settlement check
105
- # from a payer). If the payment is an ERA, then you should used the
106
- # insurance-adjudications API.
107
- #
108
- # @param request [Hash] Request of type CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentCreate, as a Hash
109
- # * :payer_identifier (Hash)
110
- # * :amount_cents (Integer)
111
- # * :payment_timestamp (DateTime)
112
- # * :payment_note (String)
113
- # * :allocations (Array<CandidApiClient::Financials::Types::AllocationCreate>)
114
- # @param request_options [CandidApiClient::RequestOptions]
115
- # @return [CandidApiClient::InsurancePayments::V1::Types::InsurancePayment]
116
- # @example
117
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
118
- # api.insurance_payments.v_1.create(request: { amount_cents: 1, payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), payment_note: "string", allocations: [{ amount_cents: 1 }] })
119
- def create(request:, request_options: nil)
120
- response = @request_client.conn.post do |req|
121
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
122
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
123
- req.headers = {
124
- **(req.headers || {}),
125
- **@request_client.get_headers,
126
- **(request_options&.additional_headers || {})
127
- }.compact
128
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
129
- req.url "#{@request_client.get_url(environment: CandidApi,
130
- request_options: request_options)}/api/insurance-payments/v1"
131
- end
132
- CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body)
133
- end
134
-
135
- # Updates the patient payment record matching the provided insurance_payment_id.
136
- # If updating the payment amount,
137
- # then the allocations must be appropriately updated as well.
138
- #
139
- # @param insurance_payment_id [String]
140
- # @param payment_timestamp [DateTime]
141
- # @param payment_note [CandidApiClient::Financials::Types::NoteUpdate]
142
- # @param request_options [CandidApiClient::RequestOptions]
143
- # @return [CandidApiClient::InsurancePayments::V1::Types::InsurancePayment]
144
- # @example
145
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
146
- # api.insurance_payments.v_1.update(insurance_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
147
- def update(insurance_payment_id:, payment_timestamp: nil, payment_note: nil, request_options: nil)
148
- response = @request_client.conn.patch do |req|
149
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
150
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
151
- req.headers = {
152
- **(req.headers || {}),
153
- **@request_client.get_headers,
154
- **(request_options&.additional_headers || {})
155
- }.compact
156
- req.body = {
157
- **(request_options&.additional_body_parameters || {}),
158
- payment_timestamp: payment_timestamp,
159
- payment_note: payment_note
160
- }.compact
161
- req.url "#{@request_client.get_url(environment: CandidApi,
162
- request_options: request_options)}/api/insurance-payments/v1/#{insurance_payment_id}"
163
- end
164
- CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body)
165
- end
166
-
167
- # Deletes the insurance payment record matching the provided
168
- # `insurance_payment_id`.
169
- # If the matching record's organization_id does not match the authenticated user's
170
- # current organization_id, then a response code of `403` will be returned.
171
- #
172
- # @param insurance_payment_id [String]
173
- # @param request_options [CandidApiClient::RequestOptions]
174
- # @return [Void]
175
- # @example
176
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
177
- # api.insurance_payments.v_1.delete(insurance_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
178
- def delete(insurance_payment_id:, request_options: nil)
179
- @request_client.conn.delete do |req|
180
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
181
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
182
- req.headers = {
183
- **(req.headers || {}),
184
- **@request_client.get_headers,
185
- **(request_options&.additional_headers || {})
186
- }.compact
187
- req.url "#{@request_client.get_url(environment: CandidApi,
188
- request_options: request_options)}/api/insurance-payments/v1/#{insurance_payment_id}"
189
- end
190
- end
191
97
  end
192
98
 
193
99
  class AsyncV1Client
@@ -278,103 +184,6 @@ module CandidApiClient
278
184
  CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body)
279
185
  end
280
186
  end
281
-
282
- # Creates a new insurance payment record and returns the newly created
283
- # `InsurancePayment` object. This endpoint
284
- # should only be used for insurance payments that do not have a corresponding ERA
285
- # (for example: a settlement check
286
- # from a payer). If the payment is an ERA, then you should used the
287
- # insurance-adjudications API.
288
- #
289
- # @param request [Hash] Request of type CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentCreate, as a Hash
290
- # * :payer_identifier (Hash)
291
- # * :amount_cents (Integer)
292
- # * :payment_timestamp (DateTime)
293
- # * :payment_note (String)
294
- # * :allocations (Array<CandidApiClient::Financials::Types::AllocationCreate>)
295
- # @param request_options [CandidApiClient::RequestOptions]
296
- # @return [CandidApiClient::InsurancePayments::V1::Types::InsurancePayment]
297
- # @example
298
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
299
- # api.insurance_payments.v_1.create(request: { amount_cents: 1, payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z), payment_note: "string", allocations: [{ amount_cents: 1 }] })
300
- def create(request:, request_options: nil)
301
- Async do
302
- response = @request_client.conn.post do |req|
303
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
304
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
305
- req.headers = {
306
- **(req.headers || {}),
307
- **@request_client.get_headers,
308
- **(request_options&.additional_headers || {})
309
- }.compact
310
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
311
- req.url "#{@request_client.get_url(environment: CandidApi,
312
- request_options: request_options)}/api/insurance-payments/v1"
313
- end
314
- CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body)
315
- end
316
- end
317
-
318
- # Updates the patient payment record matching the provided insurance_payment_id.
319
- # If updating the payment amount,
320
- # then the allocations must be appropriately updated as well.
321
- #
322
- # @param insurance_payment_id [String]
323
- # @param payment_timestamp [DateTime]
324
- # @param payment_note [CandidApiClient::Financials::Types::NoteUpdate]
325
- # @param request_options [CandidApiClient::RequestOptions]
326
- # @return [CandidApiClient::InsurancePayments::V1::Types::InsurancePayment]
327
- # @example
328
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
329
- # api.insurance_payments.v_1.update(insurance_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
330
- def update(insurance_payment_id:, payment_timestamp: nil, payment_note: nil, request_options: nil)
331
- Async do
332
- response = @request_client.conn.patch do |req|
333
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
334
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
335
- req.headers = {
336
- **(req.headers || {}),
337
- **@request_client.get_headers,
338
- **(request_options&.additional_headers || {})
339
- }.compact
340
- req.body = {
341
- **(request_options&.additional_body_parameters || {}),
342
- payment_timestamp: payment_timestamp,
343
- payment_note: payment_note
344
- }.compact
345
- req.url "#{@request_client.get_url(environment: CandidApi,
346
- request_options: request_options)}/api/insurance-payments/v1/#{insurance_payment_id}"
347
- end
348
- CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body)
349
- end
350
- end
351
-
352
- # Deletes the insurance payment record matching the provided
353
- # `insurance_payment_id`.
354
- # If the matching record's organization_id does not match the authenticated user's
355
- # current organization_id, then a response code of `403` will be returned.
356
- #
357
- # @param insurance_payment_id [String]
358
- # @param request_options [CandidApiClient::RequestOptions]
359
- # @return [Void]
360
- # @example
361
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
362
- # api.insurance_payments.v_1.delete(insurance_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
363
- def delete(insurance_payment_id:, request_options: nil)
364
- Async do
365
- @request_client.conn.delete do |req|
366
- req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
367
- req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
368
- req.headers = {
369
- **(req.headers || {}),
370
- **@request_client.get_headers,
371
- **(request_options&.additional_headers || {})
372
- }.compact
373
- req.url "#{@request_client.get_url(environment: CandidApi,
374
- request_options: request_options)}/api/insurance-payments/v1/#{insurance_payment_id}"
375
- end
376
- end
377
- end
378
187
  end
379
188
  end
380
189
  end
@@ -40,7 +40,7 @@ module CandidApiClient
40
40
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
41
41
  # @example
42
42
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
43
- # api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, description: "string", modifiers: [TWENTY_TWO] })
43
+ # api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, description: "string", modifiers: [AV] })
44
44
  def create(request:, request_options: nil)
45
45
  response = @request_client.conn.post do |req|
46
46
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -90,7 +90,7 @@ module CandidApiClient
90
90
  # @return [CandidApiClient::Encounters::V4::Types::Encounter]
91
91
  # @example
92
92
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
93
- # api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, description: "string", modifiers: [TWENTY_TWO] })
93
+ # api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, description: "string", modifiers: [AV] })
94
94
  def create(request:, request_options: nil)
95
95
  Async do
96
96
  response = @request_client.conn.post do |req|
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "period"
3
4
  require_relative "canonical_clinical_trial_association"
4
5
  require "ostruct"
5
6
  require "json"
@@ -13,6 +14,8 @@ module CandidApiClient
13
14
  attr_reader :id
14
15
  # @return [String]
15
16
  attr_reader :member_id
17
+ # @return [CandidApiClient::PreEncounter::Common::Types::Period]
18
+ attr_reader :period
16
19
  # @return [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation>] A patient cannot be associated with a given trial more than once
17
20
  attr_reader :clinical_trial_info
18
21
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -25,17 +28,20 @@ module CandidApiClient
25
28
 
26
29
  # @param id [String]
27
30
  # @param member_id [String]
31
+ # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
28
32
  # @param clinical_trial_info [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation>] A patient cannot be associated with a given trial more than once
29
33
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
34
  # @return [CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation]
31
- def initialize(id:, member_id: OMIT, clinical_trial_info: OMIT, additional_properties: nil)
35
+ def initialize(id:, member_id: OMIT, period: OMIT, clinical_trial_info: OMIT, additional_properties: nil)
32
36
  @id = id
33
37
  @member_id = member_id if member_id != OMIT
38
+ @period = period if period != OMIT
34
39
  @clinical_trial_info = clinical_trial_info if clinical_trial_info != OMIT
35
40
  @additional_properties = additional_properties
36
41
  @_field_set = {
37
42
  "id": id,
38
43
  "member_id": member_id,
44
+ "period": period,
39
45
  "clinical_trial_info": clinical_trial_info
40
46
  }.reject do |_k, v|
41
47
  v == OMIT
@@ -52,6 +58,12 @@ module CandidApiClient
52
58
  parsed_json = JSON.parse(json_object)
53
59
  id = struct["id"]
54
60
  member_id = struct["member_id"]
61
+ if parsed_json["period"].nil?
62
+ period = nil
63
+ else
64
+ period = parsed_json["period"].to_json
65
+ period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
66
+ end
55
67
  clinical_trial_info = parsed_json["clinical_trial_info"]&.map do |item|
56
68
  item = item.to_json
57
69
  CandidApiClient::PreEncounter::Common::Types::CanonicalClinicalTrialAssociation.from_json(json_object: item)
@@ -59,6 +71,7 @@ module CandidApiClient
59
71
  new(
60
72
  id: id,
61
73
  member_id: member_id,
74
+ period: period,
62
75
  clinical_trial_info: clinical_trial_info,
63
76
  additional_properties: struct
64
77
  )
@@ -80,6 +93,7 @@ module CandidApiClient
80
93
  def self.validate_raw(obj:)
81
94
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
82
95
  obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
96
+ obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
83
97
  obj.clinical_trial_info&.is_a?(Array) != false || raise("Passed value for field obj.clinical_trial_info is not the expected type, validation failed.")
84
98
  end
85
99
  end
@@ -7,6 +7,7 @@ module CandidApiClient
7
7
  module Types
8
8
  class AuthorizationUnit
9
9
  VISIT = "VISIT"
10
+ UNIT = "UNIT"
10
11
  end
11
12
  end
12
13
  end
@@ -65,7 +65,7 @@ module CandidApiClient
65
65
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
66
66
  # @example
67
67
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
68
- # api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, ordering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
68
+ # api.service_lines.v_2.create(request: { modifiers: [AV], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, ordering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
69
69
  def create(request:, request_options: nil)
70
70
  response = @request_client.conn.post do |req|
71
71
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -116,7 +116,7 @@ module CandidApiClient
116
116
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
117
117
  # @example
118
118
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
119
- # api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
119
+ # api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [AV], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
120
120
  def update(service_line_id:, request:, request_options: nil)
121
121
  response = @request_client.conn.patch do |req|
122
122
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -210,7 +210,7 @@ module CandidApiClient
210
210
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
211
211
  # @example
212
212
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
213
- # api.service_lines.v_2.create(request: { modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, ordering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
213
+ # api.service_lines.v_2.create(request: { modifiers: [AV], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, procedure_code: "string", quantity: "string", units: MJ, claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, ordering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
214
214
  def create(request:, request_options: nil)
215
215
  Async do
216
216
  response = @request_client.conn.post do |req|
@@ -263,7 +263,7 @@ module CandidApiClient
263
263
  # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
264
264
  # @example
265
265
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
266
- # api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
266
+ # api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [AV], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), test_results: [{ value: 1.1, result_type: HEMATOCRIT }], has_epsdt_indicator: true, has_family_planning_indicator: true })
267
267
  def update(service_line_id:, request:, request_options: nil)
268
268
  Async do
269
269
  response = @request_client.conn.patch do |req|
@@ -14,6 +14,7 @@ module CandidApiClient
14
14
  COLLECTION_AGENCY = "COLLECTION_AGENCY"
15
15
  OTHER = "OTHER"
16
16
  UNKNOWN = "UNKNOWN"
17
+ UNCOLLECTIBLE_OR_NON_BILLABLE = "UNCOLLECTIBLE_OR_NON_BILLABLE"
17
18
  end
18
19
  end
19
20
  end
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.40.1" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.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.40.1" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.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
@@ -6,12 +6,16 @@ require_relative "candidhealth/billing_notes/v_2/types/billing_note_base"
6
6
  require_relative "candidhealth/billing_notes/v_2/types/billing_note"
7
7
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_page"
8
8
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle"
9
+ require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_summary"
9
10
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_bundle_error"
10
11
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_status"
12
+ require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_sort_field"
11
13
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_page"
12
14
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture"
13
15
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_data"
16
+ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_sort_field"
14
17
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_status"
18
+ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change"
15
19
  require_relative "candidhealth/claim_submission/v_1/types/claim_frequency_type_code"
16
20
  require_relative "candidhealth/claim_submission/v_1/types/external_claim_submission_create"
17
21
  require_relative "candidhealth/claim_submission/v_1/types/claim_submission_record_create"
@@ -174,7 +178,6 @@ require_relative "candidhealth/insurance_cards/v_2/types/insurance_card_base"
174
178
  require_relative "candidhealth/insurance_cards/v_2/types/insurance_card_create"
175
179
  require_relative "candidhealth/insurance_cards/v_2/types/insurance_card"
176
180
  require_relative "candidhealth/insurance_payments/v_1/types/insurance_payment"
177
- require_relative "candidhealth/insurance_payments/v_1/types/insurance_payment_create"
178
181
  require_relative "candidhealth/insurance_payments/v_1/types/insurance_payments_page"
179
182
  require_relative "candidhealth/insurance_payments/v_1/types/insurance_payment_sort_field"
180
183
  require_relative "candidhealth/insurance_refunds/v_1/types/insurance_refund"
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.40.1
4
+ version: 0.40.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-27 00:00:00.000000000 Z
11
+ date: 2025-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -110,13 +110,17 @@ files:
110
110
  - lib/candidhealth/charge_capture/v_1/types/charge_capture.rb
111
111
  - lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb
112
112
  - lib/candidhealth/charge_capture/v_1/types/charge_capture_page.rb
113
+ - lib/candidhealth/charge_capture/v_1/types/charge_capture_post_billed_change.rb
114
+ - lib/candidhealth/charge_capture/v_1/types/charge_capture_sort_field.rb
113
115
  - lib/candidhealth/charge_capture/v_1/types/charge_capture_status.rb
114
116
  - lib/candidhealth/charge_capture_bundles/client.rb
115
117
  - lib/candidhealth/charge_capture_bundles/v_1/client.rb
116
118
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_bundle_error.rb
117
119
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle.rb
118
120
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_page.rb
121
+ - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_sort_field.rb
119
122
  - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_status.rb
123
+ - lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_summary.rb
120
124
  - lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb
121
125
  - lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb
122
126
  - lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create.rb
@@ -395,7 +399,6 @@ files:
395
399
  - lib/candidhealth/insurance_payments/client.rb
396
400
  - lib/candidhealth/insurance_payments/v_1/client.rb
397
401
  - lib/candidhealth/insurance_payments/v_1/types/insurance_payment.rb
398
- - lib/candidhealth/insurance_payments/v_1/types/insurance_payment_create.rb
399
402
  - lib/candidhealth/insurance_payments/v_1/types/insurance_payment_sort_field.rb
400
403
  - lib/candidhealth/insurance_payments/v_1/types/insurance_payments_page.rb
401
404
  - lib/candidhealth/insurance_refunds/client.rb
@@ -1,114 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../../../payers/v_3/types/payer_identifier"
4
- require "date"
5
- require_relative "../../../financials/types/allocation_create"
6
- require "ostruct"
7
- require "json"
8
-
9
- module CandidApiClient
10
- module InsurancePayments
11
- module V1
12
- module Types
13
- class InsurancePaymentCreate
14
- # @return [CandidApiClient::Payers::V3::Types::PayerIdentifier]
15
- attr_reader :payer_identifier
16
- # @return [Integer]
17
- attr_reader :amount_cents
18
- # @return [DateTime]
19
- attr_reader :payment_timestamp
20
- # @return [String]
21
- attr_reader :payment_note
22
- # @return [Array<CandidApiClient::Financials::Types::AllocationCreate>]
23
- attr_reader :allocations
24
- # @return [OpenStruct] Additional properties unmapped to the current class definition
25
- attr_reader :additional_properties
26
- # @return [Object]
27
- attr_reader :_field_set
28
- protected :_field_set
29
-
30
- OMIT = Object.new
31
-
32
- # @param payer_identifier [CandidApiClient::Payers::V3::Types::PayerIdentifier]
33
- # @param amount_cents [Integer]
34
- # @param payment_timestamp [DateTime]
35
- # @param payment_note [String]
36
- # @param allocations [Array<CandidApiClient::Financials::Types::AllocationCreate>]
37
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
38
- # @return [CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentCreate]
39
- def initialize(payer_identifier:, amount_cents:, allocations:, payment_timestamp: OMIT, payment_note: OMIT,
40
- additional_properties: nil)
41
- @payer_identifier = payer_identifier
42
- @amount_cents = amount_cents
43
- @payment_timestamp = payment_timestamp if payment_timestamp != OMIT
44
- @payment_note = payment_note if payment_note != OMIT
45
- @allocations = allocations
46
- @additional_properties = additional_properties
47
- @_field_set = {
48
- "payer_identifier": payer_identifier,
49
- "amount_cents": amount_cents,
50
- "payment_timestamp": payment_timestamp,
51
- "payment_note": payment_note,
52
- "allocations": allocations
53
- }.reject do |_k, v|
54
- v == OMIT
55
- end
56
- end
57
-
58
- # Deserialize a JSON object to an instance of InsurancePaymentCreate
59
- #
60
- # @param json_object [String]
61
- # @return [CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentCreate]
62
- def self.from_json(json_object:)
63
- struct = JSON.parse(json_object, object_class: OpenStruct)
64
- parsed_json = JSON.parse(json_object)
65
- if parsed_json["payer_identifier"].nil?
66
- payer_identifier = nil
67
- else
68
- payer_identifier = parsed_json["payer_identifier"].to_json
69
- payer_identifier = CandidApiClient::Payers::V3::Types::PayerIdentifier.from_json(json_object: payer_identifier)
70
- end
71
- amount_cents = struct["amount_cents"]
72
- payment_timestamp = unless parsed_json["payment_timestamp"].nil?
73
- DateTime.parse(parsed_json["payment_timestamp"])
74
- end
75
- payment_note = struct["payment_note"]
76
- allocations = parsed_json["allocations"]&.map do |item|
77
- item = item.to_json
78
- CandidApiClient::Financials::Types::AllocationCreate.from_json(json_object: item)
79
- end
80
- new(
81
- payer_identifier: payer_identifier,
82
- amount_cents: amount_cents,
83
- payment_timestamp: payment_timestamp,
84
- payment_note: payment_note,
85
- allocations: allocations,
86
- additional_properties: struct
87
- )
88
- end
89
-
90
- # Serialize an instance of InsurancePaymentCreate to a JSON object
91
- #
92
- # @return [String]
93
- def to_json(*_args)
94
- @_field_set&.to_json
95
- end
96
-
97
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
98
- # hash and check each fields type against the current object's property
99
- # definitions.
100
- #
101
- # @param obj [Object]
102
- # @return [Void]
103
- def self.validate_raw(obj:)
104
- CandidApiClient::Payers::V3::Types::PayerIdentifier.validate_raw(obj: obj.payer_identifier)
105
- obj.amount_cents.is_a?(Integer) != false || raise("Passed value for field obj.amount_cents is not the expected type, validation failed.")
106
- obj.payment_timestamp&.is_a?(DateTime) != false || raise("Passed value for field obj.payment_timestamp is not the expected type, validation failed.")
107
- obj.payment_note&.is_a?(String) != false || raise("Passed value for field obj.payment_note is not the expected type, validation failed.")
108
- obj.allocations.is_a?(Array) != false || raise("Passed value for field obj.allocations is not the expected type, validation failed.")
109
- end
110
- end
111
- end
112
- end
113
- end
114
- end