candidhealth 0.34.9 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35b972dbdd879822e8a21f3882ac83d11a4fb91b26209aaa72be4b2a6d5dd7f6
4
- data.tar.gz: e11b9a4569a50abe17869cfe4c0eb217c9f8077629619dbb1793004af2cc73c8
3
+ metadata.gz: 37173c09099bf364476fed5288b097bfbc67905d28546833e76f424548b0032c
4
+ data.tar.gz: da19a7f4fbe98e3ddf91c5d7d46ae3488ab36102e0d6a7c152c64b9ec66f5938
5
5
  SHA512:
6
- metadata.gz: 552620decaa04edf840079415e0dae9b196c0d7014bfee52f3990f1ae35013c8211174a2de10a486798d99b7a19018dc7932e352f4b06f6570f3a8575a615d3d
7
- data.tar.gz: 9de740f6b537e57548f16ec1887d3c61ce2c5d0fe275467fcac308798eff77c5479626ce4c6538de8623a5bf55bcde2c019e853b4185ef6d1b50ed7ad96203c5
6
+ metadata.gz: d2fe34c83975edef7da0b0abdacbaafadff8e3174414161e9b7c3960d0505f7ee1beed0bbc24baef4ca06966a9d07bb116143f584686732a3ca7a95b2f465fb8
7
+ data.tar.gz: 377e2e29b29a32513cc56b986e2d643ed97379b51ccf7099b315c09a01fe58a91392613a3ef830f259ca595775ec4d695c58d155920febd2852056ac22866183
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../requests"
4
+ require_relative "v_2/client"
5
+
6
+ module CandidApiClient
7
+ module Credentialing
8
+ class Client
9
+ # @return [CandidApiClient::Credentialing::V2::V2Client]
10
+ attr_reader :v_2
11
+
12
+ # @param request_client [CandidApiClient::RequestClient]
13
+ # @return [CandidApiClient::Credentialing::Client]
14
+ def initialize(request_client:)
15
+ @v_2 = CandidApiClient::Credentialing::V2::V2Client.new(request_client: request_client)
16
+ end
17
+ end
18
+
19
+ class AsyncClient
20
+ # @return [CandidApiClient::Credentialing::V2::AsyncV2Client]
21
+ attr_reader :v_2
22
+
23
+ # @param request_client [CandidApiClient::AsyncRequestClient]
24
+ # @return [CandidApiClient::Credentialing::AsyncClient]
25
+ def initialize(request_client:)
26
+ @v_2 = CandidApiClient::Credentialing::V2::AsyncV2Client.new(request_client: request_client)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,410 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../requests"
4
+ require "date"
5
+ require_relative "../../commons/types/regions"
6
+ require_relative "types/provider_credentialing_span"
7
+ require_relative "types/provider_credentialing_span_page"
8
+ require "async"
9
+
10
+ module CandidApiClient
11
+ module Credentialing
12
+ module V2
13
+ class V2Client
14
+ # @return [CandidApiClient::RequestClient]
15
+ attr_reader :request_client
16
+
17
+ # @param request_client [CandidApiClient::RequestClient]
18
+ # @return [CandidApiClient::Credentialing::V2::V2Client]
19
+ def initialize(request_client:)
20
+ @request_client = request_client
21
+ end
22
+
23
+ # @param rendering_provider_id [String] The ID of the rendering provider covered by the credentialing span.
24
+ # @param contracting_provider_id [String] The ID of the practice location at which the rendering provider is covered by
25
+ # the credentialing span.
26
+ # @param payer_uuid [String] The ID of the payer covered by the credentialing span.
27
+ # @param start_date [Date] Start date of the credentialing span.
28
+ # @param end_date [Date] End date of the credentialing span.
29
+ # @param regions [CandidApiClient::Commons::Types::Regions] The states covered by the credentialing span. A span may be national and cover
30
+ # all states.
31
+ # @param submitted_date [Date] Date that the credential paperwork was submitted.
32
+ # @param payer_loaded_date [Date] Date that the payer loaded the credentialing span into their system.
33
+ # @param request_options [CandidApiClient::RequestOptions]
34
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
35
+ # @example
36
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
37
+ # api.credentialing.v_2.create(
38
+ # rendering_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
39
+ # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
40
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
41
+ # start_date: DateTime.parse(2023-01-15),
42
+ # end_date: DateTime.parse(2023-01-15),
43
+ # submitted_date: DateTime.parse(2023-01-15),
44
+ # payer_loaded_date: DateTime.parse(2023-01-15)
45
+ # )
46
+ def create(rendering_provider_id:, contracting_provider_id:, payer_uuid:, regions:, start_date: nil,
47
+ end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
48
+ response = @request_client.conn.post do |req|
49
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
50
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
51
+ req.headers = {
52
+ **(req.headers || {}),
53
+ **@request_client.get_headers,
54
+ **(request_options&.additional_headers || {})
55
+ }.compact
56
+ req.body = {
57
+ **(request_options&.additional_body_parameters || {}),
58
+ rendering_provider_id: rendering_provider_id,
59
+ contracting_provider_id: contracting_provider_id,
60
+ payer_uuid: payer_uuid,
61
+ start_date: start_date,
62
+ end_date: end_date,
63
+ regions: regions,
64
+ submitted_date: submitted_date,
65
+ payer_loaded_date: payer_loaded_date
66
+ }.compact
67
+ req.url "#{@request_client.get_url(environment: CandidApi,
68
+ request_options: request_options)}/api/provider-credentialing-span/v2"
69
+ end
70
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
71
+ end
72
+
73
+ # @param provider_credentialing_id [String]
74
+ # @param request_options [CandidApiClient::RequestOptions]
75
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
76
+ # @example
77
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
78
+ # api.credentialing.v_2.get(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
79
+ def get(provider_credentialing_id:, request_options: nil)
80
+ response = @request_client.conn.get do |req|
81
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
82
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
83
+ req.headers = {
84
+ **(req.headers || {}),
85
+ **@request_client.get_headers,
86
+ **(request_options&.additional_headers || {})
87
+ }.compact
88
+ req.url "#{@request_client.get_url(environment: CandidApi,
89
+ request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
90
+ end
91
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
92
+ end
93
+
94
+ # @param limit [Integer] Maximum number of entities per page, defaults to 100.
95
+ # @param page_token [String]
96
+ # @param payer_uuid [String] Filter by payer.
97
+ # @param as_rendering_provider [Boolean] Filter to credentialing spans where the provider is a rendering provider.
98
+ # @param as_contracting_provider [Boolean] Filter to credentialing spans where the provider is a contracting provider.
99
+ # @param request_options [CandidApiClient::RequestOptions]
100
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
101
+ # @example
102
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
103
+ # api.credentialing.v_2.get_all(
104
+ # limit: 1,
105
+ # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
106
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
107
+ # as_rendering_provider: true,
108
+ # as_contracting_provider: true
109
+ # )
110
+ def get_all(limit: nil, page_token: nil, payer_uuid: nil, as_rendering_provider: nil,
111
+ as_contracting_provider: nil, request_options: nil)
112
+ response = @request_client.conn.get do |req|
113
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
114
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
115
+ req.headers = {
116
+ **(req.headers || {}),
117
+ **@request_client.get_headers,
118
+ **(request_options&.additional_headers || {})
119
+ }.compact
120
+ req.params = {
121
+ **(request_options&.additional_query_parameters || {}),
122
+ "limit": limit,
123
+ "page_token": page_token,
124
+ "payer_uuid": payer_uuid,
125
+ "as_rendering_provider": as_rendering_provider,
126
+ "as_contracting_provider": as_contracting_provider
127
+ }.compact
128
+ req.url "#{@request_client.get_url(environment: CandidApi,
129
+ request_options: request_options)}/api/provider-credentialing-span/v2"
130
+ end
131
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage.from_json(json_object: response.body)
132
+ end
133
+
134
+ # Soft deletes a credentialing span rate from the system.
135
+ #
136
+ # @param provider_credentialing_id [String]
137
+ # @param request_options [CandidApiClient::RequestOptions]
138
+ # @return [Void]
139
+ # @example
140
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
141
+ # api.credentialing.v_2.delete(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
142
+ def delete(provider_credentialing_id:, request_options: nil)
143
+ @request_client.conn.delete do |req|
144
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
145
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
146
+ req.headers = {
147
+ **(req.headers || {}),
148
+ **@request_client.get_headers,
149
+ **(request_options&.additional_headers || {})
150
+ }.compact
151
+ req.url "#{@request_client.get_url(environment: CandidApi,
152
+ request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
153
+ end
154
+ end
155
+
156
+ # @param provider_credentialing_id [String]
157
+ # @param contracting_provider_id [String] The ID of the practice location at which the rendering provider is covered by
158
+ # the credentialing span.
159
+ # @param payer_uuid [String] The ID of the payer doing the credentialing.
160
+ # @param start_date [Date] Start date of the credentialing span.
161
+ # @param end_date [Date] End date of the credentialing span.
162
+ # @param regions [CandidApiClient::Commons::Types::Regions] The states covered by the credentialing span. A span may be national and cover
163
+ # all states.
164
+ # @param submitted_date [Date] Date that the credential paperwork was submitted.
165
+ # @param payer_loaded_date [Date] Date that the payer loaded the credentialing span into their system.
166
+ # @param request_options [CandidApiClient::RequestOptions]
167
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
168
+ # @example
169
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
170
+ # api.credentialing.v_2.update(
171
+ # provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
172
+ # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
173
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
174
+ # start_date: DateTime.parse(2023-01-15),
175
+ # end_date: DateTime.parse(2023-01-15),
176
+ # submitted_date: DateTime.parse(2023-01-15),
177
+ # payer_loaded_date: DateTime.parse(2023-01-15)
178
+ # )
179
+ def update(provider_credentialing_id:, contracting_provider_id: nil, payer_uuid: nil, start_date: nil,
180
+ end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
181
+ response = @request_client.conn.patch do |req|
182
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
183
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
184
+ req.headers = {
185
+ **(req.headers || {}),
186
+ **@request_client.get_headers,
187
+ **(request_options&.additional_headers || {})
188
+ }.compact
189
+ req.body = {
190
+ **(request_options&.additional_body_parameters || {}),
191
+ contracting_provider_id: contracting_provider_id,
192
+ payer_uuid: payer_uuid,
193
+ start_date: start_date,
194
+ end_date: end_date,
195
+ regions: regions,
196
+ submitted_date: submitted_date,
197
+ payer_loaded_date: payer_loaded_date
198
+ }.compact
199
+ req.url "#{@request_client.get_url(environment: CandidApi,
200
+ request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
201
+ end
202
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
203
+ end
204
+ end
205
+
206
+ class AsyncV2Client
207
+ # @return [CandidApiClient::AsyncRequestClient]
208
+ attr_reader :request_client
209
+
210
+ # @param request_client [CandidApiClient::AsyncRequestClient]
211
+ # @return [CandidApiClient::Credentialing::V2::AsyncV2Client]
212
+ def initialize(request_client:)
213
+ @request_client = request_client
214
+ end
215
+
216
+ # @param rendering_provider_id [String] The ID of the rendering provider covered by the credentialing span.
217
+ # @param contracting_provider_id [String] The ID of the practice location at which the rendering provider is covered by
218
+ # the credentialing span.
219
+ # @param payer_uuid [String] The ID of the payer covered by the credentialing span.
220
+ # @param start_date [Date] Start date of the credentialing span.
221
+ # @param end_date [Date] End date of the credentialing span.
222
+ # @param regions [CandidApiClient::Commons::Types::Regions] The states covered by the credentialing span. A span may be national and cover
223
+ # all states.
224
+ # @param submitted_date [Date] Date that the credential paperwork was submitted.
225
+ # @param payer_loaded_date [Date] Date that the payer loaded the credentialing span into their system.
226
+ # @param request_options [CandidApiClient::RequestOptions]
227
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
228
+ # @example
229
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
230
+ # api.credentialing.v_2.create(
231
+ # rendering_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
232
+ # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
233
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
234
+ # start_date: DateTime.parse(2023-01-15),
235
+ # end_date: DateTime.parse(2023-01-15),
236
+ # submitted_date: DateTime.parse(2023-01-15),
237
+ # payer_loaded_date: DateTime.parse(2023-01-15)
238
+ # )
239
+ def create(rendering_provider_id:, contracting_provider_id:, payer_uuid:, regions:, start_date: nil,
240
+ end_date: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
241
+ Async do
242
+ response = @request_client.conn.post do |req|
243
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
244
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
245
+ req.headers = {
246
+ **(req.headers || {}),
247
+ **@request_client.get_headers,
248
+ **(request_options&.additional_headers || {})
249
+ }.compact
250
+ req.body = {
251
+ **(request_options&.additional_body_parameters || {}),
252
+ rendering_provider_id: rendering_provider_id,
253
+ contracting_provider_id: contracting_provider_id,
254
+ payer_uuid: payer_uuid,
255
+ start_date: start_date,
256
+ end_date: end_date,
257
+ regions: regions,
258
+ submitted_date: submitted_date,
259
+ payer_loaded_date: payer_loaded_date
260
+ }.compact
261
+ req.url "#{@request_client.get_url(environment: CandidApi,
262
+ request_options: request_options)}/api/provider-credentialing-span/v2"
263
+ end
264
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
265
+ end
266
+ end
267
+
268
+ # @param provider_credentialing_id [String]
269
+ # @param request_options [CandidApiClient::RequestOptions]
270
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
271
+ # @example
272
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
273
+ # api.credentialing.v_2.get(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
274
+ def get(provider_credentialing_id:, request_options: nil)
275
+ Async do
276
+ response = @request_client.conn.get do |req|
277
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
278
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
279
+ req.headers = {
280
+ **(req.headers || {}),
281
+ **@request_client.get_headers,
282
+ **(request_options&.additional_headers || {})
283
+ }.compact
284
+ req.url "#{@request_client.get_url(environment: CandidApi,
285
+ request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
286
+ end
287
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
288
+ end
289
+ end
290
+
291
+ # @param limit [Integer] Maximum number of entities per page, defaults to 100.
292
+ # @param page_token [String]
293
+ # @param payer_uuid [String] Filter by payer.
294
+ # @param as_rendering_provider [Boolean] Filter to credentialing spans where the provider is a rendering provider.
295
+ # @param as_contracting_provider [Boolean] Filter to credentialing spans where the provider is a contracting provider.
296
+ # @param request_options [CandidApiClient::RequestOptions]
297
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage]
298
+ # @example
299
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
300
+ # api.credentialing.v_2.get_all(
301
+ # limit: 1,
302
+ # page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9",
303
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
304
+ # as_rendering_provider: true,
305
+ # as_contracting_provider: true
306
+ # )
307
+ def get_all(limit: nil, page_token: nil, payer_uuid: nil, as_rendering_provider: nil,
308
+ as_contracting_provider: nil, request_options: nil)
309
+ Async do
310
+ response = @request_client.conn.get do |req|
311
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
312
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
313
+ req.headers = {
314
+ **(req.headers || {}),
315
+ **@request_client.get_headers,
316
+ **(request_options&.additional_headers || {})
317
+ }.compact
318
+ req.params = {
319
+ **(request_options&.additional_query_parameters || {}),
320
+ "limit": limit,
321
+ "page_token": page_token,
322
+ "payer_uuid": payer_uuid,
323
+ "as_rendering_provider": as_rendering_provider,
324
+ "as_contracting_provider": as_contracting_provider
325
+ }.compact
326
+ req.url "#{@request_client.get_url(environment: CandidApi,
327
+ request_options: request_options)}/api/provider-credentialing-span/v2"
328
+ end
329
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpanPage.from_json(json_object: response.body)
330
+ end
331
+ end
332
+
333
+ # Soft deletes a credentialing span rate from the system.
334
+ #
335
+ # @param provider_credentialing_id [String]
336
+ # @param request_options [CandidApiClient::RequestOptions]
337
+ # @return [Void]
338
+ # @example
339
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
340
+ # api.credentialing.v_2.delete(provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
341
+ def delete(provider_credentialing_id:, request_options: nil)
342
+ Async do
343
+ @request_client.conn.delete do |req|
344
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
345
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
346
+ req.headers = {
347
+ **(req.headers || {}),
348
+ **@request_client.get_headers,
349
+ **(request_options&.additional_headers || {})
350
+ }.compact
351
+ req.url "#{@request_client.get_url(environment: CandidApi,
352
+ request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
353
+ end
354
+ end
355
+ end
356
+
357
+ # @param provider_credentialing_id [String]
358
+ # @param contracting_provider_id [String] The ID of the practice location at which the rendering provider is covered by
359
+ # the credentialing span.
360
+ # @param payer_uuid [String] The ID of the payer doing the credentialing.
361
+ # @param start_date [Date] Start date of the credentialing span.
362
+ # @param end_date [Date] End date of the credentialing span.
363
+ # @param regions [CandidApiClient::Commons::Types::Regions] The states covered by the credentialing span. A span may be national and cover
364
+ # all states.
365
+ # @param submitted_date [Date] Date that the credential paperwork was submitted.
366
+ # @param payer_loaded_date [Date] Date that the payer loaded the credentialing span into their system.
367
+ # @param request_options [CandidApiClient::RequestOptions]
368
+ # @return [CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan]
369
+ # @example
370
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
371
+ # api.credentialing.v_2.update(
372
+ # provider_credentialing_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
373
+ # contracting_provider_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
374
+ # payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
375
+ # start_date: DateTime.parse(2023-01-15),
376
+ # end_date: DateTime.parse(2023-01-15),
377
+ # submitted_date: DateTime.parse(2023-01-15),
378
+ # payer_loaded_date: DateTime.parse(2023-01-15)
379
+ # )
380
+ def update(provider_credentialing_id:, contracting_provider_id: nil, payer_uuid: nil, start_date: nil,
381
+ end_date: nil, regions: nil, submitted_date: nil, payer_loaded_date: nil, request_options: nil)
382
+ Async do
383
+ response = @request_client.conn.patch do |req|
384
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
385
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
386
+ req.headers = {
387
+ **(req.headers || {}),
388
+ **@request_client.get_headers,
389
+ **(request_options&.additional_headers || {})
390
+ }.compact
391
+ req.body = {
392
+ **(request_options&.additional_body_parameters || {}),
393
+ contracting_provider_id: contracting_provider_id,
394
+ payer_uuid: payer_uuid,
395
+ start_date: start_date,
396
+ end_date: end_date,
397
+ regions: regions,
398
+ submitted_date: submitted_date,
399
+ payer_loaded_date: payer_loaded_date
400
+ }.compact
401
+ req.url "#{@request_client.get_url(environment: CandidApi,
402
+ request_options: request_options)}/api/provider-credentialing-span/v2/#{provider_credentialing_id}"
403
+ end
404
+ CandidApiClient::Credentialing::V2::Types::ProviderCredentialingSpan.from_json(json_object: response.body)
405
+ end
406
+ end
407
+ end
408
+ end
409
+ end
410
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module Credentialing
5
+ module V2
6
+ module Types
7
+ # Stage of a credentialing span in the credentialing workflow.
8
+ class CredentialingSpanStatus
9
+ WORK_IN_PROGRESS = "work_in_progress"
10
+ PENDING = "pending"
11
+ EFFECTIVE = "effective"
12
+ EXPIRED = "expired"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end