candidhealth 0.38.2 → 0.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/candidhealth/charge_capture/v_1/client.rb +4 -4
- data/lib/candidhealth/charge_capture_bundles/client.rb +30 -0
- data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +227 -0
- data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_bundle_error.rb +112 -0
- data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle.rb +116 -0
- data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_page.rb +88 -0
- data/lib/candidhealth/charge_capture_bundles/v_1/types/charge_capture_bundle_status.rb +16 -0
- data/lib/candidhealth/commons/types/network_type.rb +2 -0
- data/lib/candidhealth/commons/types/not_implemented_error_message.rb +60 -0
- data/lib/candidhealth/encounter_providers/v_2/client.rb +16 -16
- data/lib/candidhealth/encounters/v_4/client.rb +26 -26
- data/lib/candidhealth/guarantor/v_1/client.rb +2 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +144 -12
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +3 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefits_related_entity.rb +99 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb +14 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +3 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value.rb +11 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status.rb +0 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb +38 -12
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/related_entity_contact.rb +74 -0
- data/lib/candidhealth/service_lines/v_2/client.rb +2 -2
- data/lib/candidhealth/x_12/v_1/types/rarc.rb +2 -0
- data/lib/candidhealth.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +7 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e370171382b7f9c5e481969453c89179bf30793e58390aa8245eb0b729d9e2c5
|
4
|
+
data.tar.gz: f361746bc4bd3105c1af624db8b156be96a6f85b0a457c099964050443b7237f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f168670877d8cf308f59023e988118ea3162542b133b6311636cb14003d899a638e618f2fe41190544200d3f796815f22ef7e1556a8dce88ac21706d8e264c04
|
7
|
+
data.tar.gz: 372694ce97ef52100df8725f8de87231b5c02b3a1816484c7e3e9274f2a5e7dad2e9ae06c7d1b65fb5d6eae2a64f28e3a5e7e47c9c2177ef86336c71232daa08
|
@@ -253,7 +253,7 @@ module CandidApiClient
|
|
253
253
|
# @example
|
254
254
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
255
255
|
# api.charge_capture.v_1.create(
|
256
|
-
# data: {
|
256
|
+
# data: { },
|
257
257
|
# charge_external_id: "string",
|
258
258
|
# ehr_source_url: "string",
|
259
259
|
# date_of_service: DateTime.parse(2023-01-15),
|
@@ -538,7 +538,7 @@ module CandidApiClient
|
|
538
538
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
539
539
|
# api.charge_capture.v_1.update(
|
540
540
|
# charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
541
|
-
# data: {
|
541
|
+
# data: { },
|
542
542
|
# charge_external_id: "string",
|
543
543
|
# ehr_source_url: "string",
|
544
544
|
# patient_external_id: "string",
|
@@ -880,7 +880,7 @@ module CandidApiClient
|
|
880
880
|
# @example
|
881
881
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
882
882
|
# api.charge_capture.v_1.create(
|
883
|
-
# data: {
|
883
|
+
# data: { },
|
884
884
|
# charge_external_id: "string",
|
885
885
|
# ehr_source_url: "string",
|
886
886
|
# date_of_service: DateTime.parse(2023-01-15),
|
@@ -1169,7 +1169,7 @@ module CandidApiClient
|
|
1169
1169
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1170
1170
|
# api.charge_capture.v_1.update(
|
1171
1171
|
# charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
1172
|
-
# data: {
|
1172
|
+
# data: { },
|
1173
1173
|
# charge_external_id: "string",
|
1174
1174
|
# ehr_source_url: "string",
|
1175
1175
|
# patient_external_id: "string",
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../requests"
|
4
|
+
require_relative "v_1/client"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module ChargeCaptureBundles
|
8
|
+
class Client
|
9
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::V1Client]
|
10
|
+
attr_reader :v_1
|
11
|
+
|
12
|
+
# @param request_client [CandidApiClient::RequestClient]
|
13
|
+
# @return [CandidApiClient::ChargeCaptureBundles::Client]
|
14
|
+
def initialize(request_client:)
|
15
|
+
@v_1 = CandidApiClient::ChargeCaptureBundles::V1::V1Client.new(request_client: request_client)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class AsyncClient
|
20
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::AsyncV1Client]
|
21
|
+
attr_reader :v_1
|
22
|
+
|
23
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
24
|
+
# @return [CandidApiClient::ChargeCaptureBundles::AsyncClient]
|
25
|
+
def initialize(request_client:)
|
26
|
+
@v_1 = CandidApiClient::ChargeCaptureBundles::V1::AsyncV1Client.new(request_client: request_client)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,227 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../requests"
|
4
|
+
require_relative "types/charge_capture_bundle"
|
5
|
+
require_relative "types/charge_capture_bundle_status"
|
6
|
+
require_relative "../../charge_capture/v_1/types/charge_capture_status"
|
7
|
+
require "date"
|
8
|
+
require_relative "types/charge_capture_bundle_page"
|
9
|
+
require "async"
|
10
|
+
|
11
|
+
module CandidApiClient
|
12
|
+
module ChargeCaptureBundles
|
13
|
+
module V1
|
14
|
+
class V1Client
|
15
|
+
# @return [CandidApiClient::RequestClient]
|
16
|
+
attr_reader :request_client
|
17
|
+
|
18
|
+
# @param request_client [CandidApiClient::RequestClient]
|
19
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::V1Client]
|
20
|
+
def initialize(request_client:)
|
21
|
+
@request_client = request_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# @param charge_capture_bundle_id [String]
|
25
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
26
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
|
27
|
+
# @example
|
28
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
29
|
+
# api.charge_capture_bundles.v_1.get(charge_capture_bundle_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
30
|
+
def get(charge_capture_bundle_id:, request_options: nil)
|
31
|
+
response = @request_client.conn.get do |req|
|
32
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
33
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
34
|
+
req.headers = {
|
35
|
+
**(req.headers || {}),
|
36
|
+
**@request_client.get_headers,
|
37
|
+
**(request_options&.additional_headers || {})
|
38
|
+
}.compact
|
39
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
40
|
+
request_options: request_options)}/api/charge_capture_bundle/v1/#{charge_capture_bundle_id}"
|
41
|
+
end
|
42
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle.from_json(json_object: response.body)
|
43
|
+
end
|
44
|
+
|
45
|
+
# @param charge_capture_bundle_id [String]
|
46
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
47
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
|
48
|
+
# @example
|
49
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
50
|
+
# api.charge_capture_bundles.v_1.resubmit(charge_capture_bundle_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
51
|
+
def resubmit(charge_capture_bundle_id:, request_options: nil)
|
52
|
+
response = @request_client.conn.post do |req|
|
53
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
54
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
55
|
+
req.headers = {
|
56
|
+
**(req.headers || {}),
|
57
|
+
**@request_client.get_headers,
|
58
|
+
**(request_options&.additional_headers || {})
|
59
|
+
}.compact
|
60
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
61
|
+
request_options: request_options)}/api/charge_capture_bundle/v1/#{charge_capture_bundle_id}"
|
62
|
+
end
|
63
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle.from_json(json_object: response.body)
|
64
|
+
end
|
65
|
+
|
66
|
+
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
67
|
+
# @param page_token [String]
|
68
|
+
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
69
|
+
# @param bundle_status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] the status of the charge capture bundle, refers to whether it was able to create
|
70
|
+
# an encounter.
|
71
|
+
# @param charge_status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
|
72
|
+
# @param charge_external_id [String] A client-specified unique ID to associate with this encounter;
|
73
|
+
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
74
|
+
# This field should not contain PHI.
|
75
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
76
|
+
# This date must be the local date in the timezone where the service occurred.
|
77
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
78
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
|
79
|
+
# @example
|
80
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
81
|
+
# api.charge_capture_bundles.v_1.get_all(
|
82
|
+
# limit: 1,
|
83
|
+
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
84
|
+
# patient_external_id: "string",
|
85
|
+
# bundle_status: IN_PROGRESS,
|
86
|
+
# charge_status: PLANNED,
|
87
|
+
# charge_external_id: "string",
|
88
|
+
# date_of_service: DateTime.parse(2023-01-15)
|
89
|
+
# )
|
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)
|
92
|
+
response = @request_client.conn.get do |req|
|
93
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
94
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
95
|
+
req.headers = {
|
96
|
+
**(req.headers || {}),
|
97
|
+
**@request_client.get_headers,
|
98
|
+
**(request_options&.additional_headers || {})
|
99
|
+
}.compact
|
100
|
+
req.params = {
|
101
|
+
**(request_options&.additional_query_parameters || {}),
|
102
|
+
"limit": limit,
|
103
|
+
"page_token": page_token,
|
104
|
+
"patient_external_id": patient_external_id,
|
105
|
+
"bundle_status": bundle_status,
|
106
|
+
"charge_status": charge_status,
|
107
|
+
"charge_external_id": charge_external_id,
|
108
|
+
"date_of_service": date_of_service
|
109
|
+
}.compact
|
110
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
111
|
+
request_options: request_options)}/api/charge_capture_bundle/v1"
|
112
|
+
end
|
113
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage.from_json(json_object: response.body)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
class AsyncV1Client
|
118
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
119
|
+
attr_reader :request_client
|
120
|
+
|
121
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
122
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::AsyncV1Client]
|
123
|
+
def initialize(request_client:)
|
124
|
+
@request_client = request_client
|
125
|
+
end
|
126
|
+
|
127
|
+
# @param charge_capture_bundle_id [String]
|
128
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
129
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
|
130
|
+
# @example
|
131
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
132
|
+
# api.charge_capture_bundles.v_1.get(charge_capture_bundle_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
133
|
+
def get(charge_capture_bundle_id:, request_options: nil)
|
134
|
+
Async do
|
135
|
+
response = @request_client.conn.get do |req|
|
136
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
137
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
138
|
+
req.headers = {
|
139
|
+
**(req.headers || {}),
|
140
|
+
**@request_client.get_headers,
|
141
|
+
**(request_options&.additional_headers || {})
|
142
|
+
}.compact
|
143
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
144
|
+
request_options: request_options)}/api/charge_capture_bundle/v1/#{charge_capture_bundle_id}"
|
145
|
+
end
|
146
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle.from_json(json_object: response.body)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# @param charge_capture_bundle_id [String]
|
151
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
152
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
|
153
|
+
# @example
|
154
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
155
|
+
# api.charge_capture_bundles.v_1.resubmit(charge_capture_bundle_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
156
|
+
def resubmit(charge_capture_bundle_id:, request_options: nil)
|
157
|
+
Async do
|
158
|
+
response = @request_client.conn.post do |req|
|
159
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
160
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
161
|
+
req.headers = {
|
162
|
+
**(req.headers || {}),
|
163
|
+
**@request_client.get_headers,
|
164
|
+
**(request_options&.additional_headers || {})
|
165
|
+
}.compact
|
166
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
167
|
+
request_options: request_options)}/api/charge_capture_bundle/v1/#{charge_capture_bundle_id}"
|
168
|
+
end
|
169
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle.from_json(json_object: response.body)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# @param limit [Integer] Maximum number of entities per page, defaults to 100.
|
174
|
+
# @param page_token [String]
|
175
|
+
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
176
|
+
# @param bundle_status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] the status of the charge capture bundle, refers to whether it was able to create
|
177
|
+
# an encounter.
|
178
|
+
# @param charge_status [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureStatus] the status of the charge captures
|
179
|
+
# @param charge_external_id [String] A client-specified unique ID to associate with this encounter;
|
180
|
+
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
181
|
+
# This field should not contain PHI.
|
182
|
+
# @param date_of_service [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
183
|
+
# This date must be the local date in the timezone where the service occurred.
|
184
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
185
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
|
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_all(
|
189
|
+
# limit: 1,
|
190
|
+
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
|
191
|
+
# patient_external_id: "string",
|
192
|
+
# bundle_status: IN_PROGRESS,
|
193
|
+
# charge_status: PLANNED,
|
194
|
+
# charge_external_id: "string",
|
195
|
+
# date_of_service: DateTime.parse(2023-01-15)
|
196
|
+
# )
|
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)
|
199
|
+
Async do
|
200
|
+
response = @request_client.conn.get do |req|
|
201
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
202
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
203
|
+
req.headers = {
|
204
|
+
**(req.headers || {}),
|
205
|
+
**@request_client.get_headers,
|
206
|
+
**(request_options&.additional_headers || {})
|
207
|
+
}.compact
|
208
|
+
req.params = {
|
209
|
+
**(request_options&.additional_query_parameters || {}),
|
210
|
+
"limit": limit,
|
211
|
+
"page_token": page_token,
|
212
|
+
"patient_external_id": patient_external_id,
|
213
|
+
"bundle_status": bundle_status,
|
214
|
+
"charge_status": charge_status,
|
215
|
+
"charge_external_id": charge_external_id,
|
216
|
+
"date_of_service": date_of_service
|
217
|
+
}.compact
|
218
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
219
|
+
request_options: request_options)}/api/charge_capture_bundle/v1"
|
220
|
+
end
|
221
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage.from_json(json_object: response.body)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -0,0 +1,112 @@
|
|
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 ChargeBundleError
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :id
|
13
|
+
# @return [String] The underlying Charge Capture that this error object references.
|
14
|
+
# The Charge Capture referenced will be a part of the bundle tied to this error.
|
15
|
+
# Errors may also refer to all charge_captures present in a bundle, in which case
|
16
|
+
# this field will be null.
|
17
|
+
attr_reader :charge_capture_id
|
18
|
+
# @return [String] A human readable error explaining why this charge capture bundle failed to
|
19
|
+
# create a claim.
|
20
|
+
attr_reader :message
|
21
|
+
# @return [String] The field of the corresponding underlying ChargeCapture that has a field that is
|
22
|
+
# failing validations,
|
23
|
+
# is not present but marked as required, or otherwise in error.
|
24
|
+
attr_reader :field_in_error
|
25
|
+
# @return [String] The ID of the ChargeCaptureBundle associated with this Error.
|
26
|
+
attr_reader :bundle_id
|
27
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
attr_reader :additional_properties
|
29
|
+
# @return [Object]
|
30
|
+
attr_reader :_field_set
|
31
|
+
protected :_field_set
|
32
|
+
|
33
|
+
OMIT = Object.new
|
34
|
+
|
35
|
+
# @param id [String]
|
36
|
+
# @param charge_capture_id [String] The underlying Charge Capture that this error object references.
|
37
|
+
# The Charge Capture referenced will be a part of the bundle tied to this error.
|
38
|
+
# Errors may also refer to all charge_captures present in a bundle, in which case
|
39
|
+
# this field will be null.
|
40
|
+
# @param message [String] A human readable error explaining why this charge capture bundle failed to
|
41
|
+
# create a claim.
|
42
|
+
# @param field_in_error [String] The field of the corresponding underlying ChargeCapture that has a field that is
|
43
|
+
# failing validations,
|
44
|
+
# is not present but marked as required, or otherwise in error.
|
45
|
+
# @param bundle_id [String] The ID of the ChargeCaptureBundle associated with this Error.
|
46
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
47
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeBundleError]
|
48
|
+
def initialize(id:, message:, bundle_id:, charge_capture_id: OMIT, field_in_error: OMIT,
|
49
|
+
additional_properties: nil)
|
50
|
+
@id = id
|
51
|
+
@charge_capture_id = charge_capture_id if charge_capture_id != OMIT
|
52
|
+
@message = message
|
53
|
+
@field_in_error = field_in_error if field_in_error != OMIT
|
54
|
+
@bundle_id = bundle_id
|
55
|
+
@additional_properties = additional_properties
|
56
|
+
@_field_set = {
|
57
|
+
"id": id,
|
58
|
+
"charge_capture_id": charge_capture_id,
|
59
|
+
"message": message,
|
60
|
+
"field_in_error": field_in_error,
|
61
|
+
"bundle_id": bundle_id
|
62
|
+
}.reject do |_k, v|
|
63
|
+
v == OMIT
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Deserialize a JSON object to an instance of ChargeBundleError
|
68
|
+
#
|
69
|
+
# @param json_object [String]
|
70
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeBundleError]
|
71
|
+
def self.from_json(json_object:)
|
72
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
73
|
+
id = struct["id"]
|
74
|
+
charge_capture_id = struct["charge_capture_id"]
|
75
|
+
message = struct["message"]
|
76
|
+
field_in_error = struct["field_in_error"]
|
77
|
+
bundle_id = struct["bundle_id"]
|
78
|
+
new(
|
79
|
+
id: id,
|
80
|
+
charge_capture_id: charge_capture_id,
|
81
|
+
message: message,
|
82
|
+
field_in_error: field_in_error,
|
83
|
+
bundle_id: bundle_id,
|
84
|
+
additional_properties: struct
|
85
|
+
)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Serialize an instance of ChargeBundleError to a JSON object
|
89
|
+
#
|
90
|
+
# @return [String]
|
91
|
+
def to_json(*_args)
|
92
|
+
@_field_set&.to_json
|
93
|
+
end
|
94
|
+
|
95
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
96
|
+
# hash and check each fields type against the current object's property
|
97
|
+
# definitions.
|
98
|
+
#
|
99
|
+
# @param obj [Object]
|
100
|
+
# @return [Void]
|
101
|
+
def self.validate_raw(obj:)
|
102
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
103
|
+
obj.charge_capture_id&.is_a?(String) != false || raise("Passed value for field obj.charge_capture_id is not the expected type, validation failed.")
|
104
|
+
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
105
|
+
obj.field_in_error&.is_a?(String) != false || raise("Passed value for field obj.field_in_error is not the expected type, validation failed.")
|
106
|
+
obj.bundle_id.is_a?(String) != false || raise("Passed value for field obj.bundle_id is not the expected type, validation failed.")
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "charge_capture_bundle_status"
|
4
|
+
require_relative "../../../charge_capture/v_1/types/charge_capture"
|
5
|
+
require_relative "charge_bundle_error"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module ChargeCaptureBundles
|
11
|
+
module V1
|
12
|
+
module Types
|
13
|
+
class ChargeCaptureBundle
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :id
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :created_encounter_id
|
18
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] Status of the Bundle, Successful means that the Bundle created a corresponding
|
19
|
+
# Claim
|
20
|
+
attr_reader :status
|
21
|
+
# @return [Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapture>] All the underlying ChargeCaptures that are present in a ChargeCaptureBundle.
|
22
|
+
attr_reader :charge_captures
|
23
|
+
# @return [Array<CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeBundleError>] All errors that were found when the bundle was attempted to be created.
|
24
|
+
# Errors can correspond to the Bundle as a whole or specific underlying Charge
|
25
|
+
# Captures.
|
26
|
+
attr_reader :errors
|
27
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
28
|
+
attr_reader :additional_properties
|
29
|
+
# @return [Object]
|
30
|
+
attr_reader :_field_set
|
31
|
+
protected :_field_set
|
32
|
+
|
33
|
+
OMIT = Object.new
|
34
|
+
|
35
|
+
# @param id [String]
|
36
|
+
# @param created_encounter_id [String]
|
37
|
+
# @param status [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus] Status of the Bundle, Successful means that the Bundle created a corresponding
|
38
|
+
# Claim
|
39
|
+
# @param charge_captures [Array<CandidApiClient::ChargeCapture::V1::Types::ChargeCapture>] All the underlying ChargeCaptures that are present in a ChargeCaptureBundle.
|
40
|
+
# @param errors [Array<CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeBundleError>] All errors that were found when the bundle was attempted to be created.
|
41
|
+
# Errors can correspond to the Bundle as a whole or specific underlying Charge
|
42
|
+
# Captures.
|
43
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
44
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
|
45
|
+
def initialize(id:, status:, charge_captures:, errors:, created_encounter_id: OMIT,
|
46
|
+
additional_properties: nil)
|
47
|
+
@id = id
|
48
|
+
@created_encounter_id = created_encounter_id if created_encounter_id != OMIT
|
49
|
+
@status = status
|
50
|
+
@charge_captures = charge_captures
|
51
|
+
@errors = errors
|
52
|
+
@additional_properties = additional_properties
|
53
|
+
@_field_set = {
|
54
|
+
"id": id,
|
55
|
+
"created_encounter_id": created_encounter_id,
|
56
|
+
"status": status,
|
57
|
+
"charge_captures": charge_captures,
|
58
|
+
"errors": errors
|
59
|
+
}.reject do |_k, v|
|
60
|
+
v == OMIT
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Deserialize a JSON object to an instance of ChargeCaptureBundle
|
65
|
+
#
|
66
|
+
# @param json_object [String]
|
67
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle]
|
68
|
+
def self.from_json(json_object:)
|
69
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
70
|
+
parsed_json = JSON.parse(json_object)
|
71
|
+
id = struct["id"]
|
72
|
+
created_encounter_id = struct["created_encounter_id"]
|
73
|
+
status = struct["status"]
|
74
|
+
charge_captures = parsed_json["charge_captures"]&.map do |item|
|
75
|
+
item = item.to_json
|
76
|
+
CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: item)
|
77
|
+
end
|
78
|
+
errors = parsed_json["errors"]&.map do |item|
|
79
|
+
item = item.to_json
|
80
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeBundleError.from_json(json_object: item)
|
81
|
+
end
|
82
|
+
new(
|
83
|
+
id: id,
|
84
|
+
created_encounter_id: created_encounter_id,
|
85
|
+
status: status,
|
86
|
+
charge_captures: charge_captures,
|
87
|
+
errors: errors,
|
88
|
+
additional_properties: struct
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Serialize an instance of ChargeCaptureBundle to a JSON object
|
93
|
+
#
|
94
|
+
# @return [String]
|
95
|
+
def to_json(*_args)
|
96
|
+
@_field_set&.to_json
|
97
|
+
end
|
98
|
+
|
99
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
100
|
+
# hash and check each fields type against the current object's property
|
101
|
+
# definitions.
|
102
|
+
#
|
103
|
+
# @param obj [Object]
|
104
|
+
# @return [Void]
|
105
|
+
def self.validate_raw(obj:)
|
106
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
107
|
+
obj.created_encounter_id&.is_a?(String) != false || raise("Passed value for field obj.created_encounter_id is not the expected type, validation failed.")
|
108
|
+
obj.status.is_a?(CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundleStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
109
|
+
obj.charge_captures.is_a?(Array) != false || raise("Passed value for field obj.charge_captures is not the expected type, validation failed.")
|
110
|
+
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "charge_capture_bundle"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module ChargeCaptureBundles
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class ChargeCaptureBundlePage
|
12
|
+
# @return [Array<CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle>]
|
13
|
+
attr_reader :items
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :prev_page_token
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :next_page_token
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param items [Array<CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle>]
|
27
|
+
# @param prev_page_token [String]
|
28
|
+
# @param next_page_token [String]
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
|
31
|
+
def initialize(items:, prev_page_token: OMIT, next_page_token: OMIT, additional_properties: nil)
|
32
|
+
@items = items
|
33
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
34
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
35
|
+
@additional_properties = additional_properties
|
36
|
+
@_field_set = {
|
37
|
+
"items": items,
|
38
|
+
"prev_page_token": prev_page_token,
|
39
|
+
"next_page_token": next_page_token
|
40
|
+
}.reject do |_k, v|
|
41
|
+
v == OMIT
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# Deserialize a JSON object to an instance of ChargeCaptureBundlePage
|
46
|
+
#
|
47
|
+
# @param json_object [String]
|
48
|
+
# @return [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundlePage]
|
49
|
+
def self.from_json(json_object:)
|
50
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
51
|
+
parsed_json = JSON.parse(json_object)
|
52
|
+
items = parsed_json["items"]&.map do |item|
|
53
|
+
item = item.to_json
|
54
|
+
CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureBundle.from_json(json_object: item)
|
55
|
+
end
|
56
|
+
prev_page_token = struct["prev_page_token"]
|
57
|
+
next_page_token = struct["next_page_token"]
|
58
|
+
new(
|
59
|
+
items: items,
|
60
|
+
prev_page_token: prev_page_token,
|
61
|
+
next_page_token: next_page_token,
|
62
|
+
additional_properties: struct
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Serialize an instance of ChargeCaptureBundlePage to a JSON object
|
67
|
+
#
|
68
|
+
# @return [String]
|
69
|
+
def to_json(*_args)
|
70
|
+
@_field_set&.to_json
|
71
|
+
end
|
72
|
+
|
73
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
74
|
+
# hash and check each fields type against the current object's property
|
75
|
+
# definitions.
|
76
|
+
#
|
77
|
+
# @param obj [Object]
|
78
|
+
# @return [Void]
|
79
|
+
def self.validate_raw(obj:)
|
80
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
81
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
82
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module ChargeCaptureBundles
|
5
|
+
module V1
|
6
|
+
module Types
|
7
|
+
class ChargeCaptureBundleStatus
|
8
|
+
IN_PROGRESS = "in-progress"
|
9
|
+
IN_ERROR = "in-error"
|
10
|
+
SUCCESSFUL = "successful"
|
11
|
+
ABORTED = "aborted"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|