candidhealth 0.34.1 → 0.34.2
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/encounter_providers/v_2/types/rendering_provider.rb +10 -10
- data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +282 -32
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +11 -11
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +11 -1
- data/lib/candidhealth/{third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb → encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb} +17 -16
- data/lib/candidhealth/guarantor/v_1/client.rb +39 -89
- data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
- data/lib/candidhealth/payers/v_3/types/payer.rb +41 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +68 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +48 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +20 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +16 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +29 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +148 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +15 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
- data/lib/candidhealth/service_facility/client.rb +27 -51
- data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +90 -0
- data/lib/candidhealth.rb +0 -21
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +13 -16
- metadata +15 -24
- data/lib/candidhealth/third_party_payer_payments/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +0 -360
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +0 -138
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +0 -124
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +0 -88
- data/lib/candidhealth/third_party_payer_refunds/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +0 -385
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +0 -139
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +0 -125
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/client.rb +0 -30
- data/lib/candidhealth/third_party_payers/v_1/client.rb +0 -375
- data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +0 -79
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +0 -100
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +0 -16
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +0 -92
@@ -1,375 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "../../../requests"
|
4
|
-
require_relative "types/create_third_party_payer_request"
|
5
|
-
require_relative "types/third_party_payer"
|
6
|
-
require_relative "types/toggle_third_party_payer_enablement_request"
|
7
|
-
require_relative "types/third_party_payer_sort_field"
|
8
|
-
require_relative "../../commons/types/sort_direction"
|
9
|
-
require_relative "types/third_party_payer_page"
|
10
|
-
require_relative "types/third_party_payer_update_request"
|
11
|
-
require "async"
|
12
|
-
|
13
|
-
module CandidApiClient
|
14
|
-
module ThirdPartyPayers
|
15
|
-
module V1
|
16
|
-
class V1Client
|
17
|
-
# @return [CandidApiClient::RequestClient]
|
18
|
-
attr_reader :request_client
|
19
|
-
|
20
|
-
# @param request_client [CandidApiClient::RequestClient]
|
21
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::V1Client]
|
22
|
-
def initialize(request_client:)
|
23
|
-
@request_client = request_client
|
24
|
-
end
|
25
|
-
|
26
|
-
# @param request [Hash] Request of type CandidApiClient::ThirdPartyPayers::V1::Types::CreateThirdPartyPayerRequest, as a Hash
|
27
|
-
# * :name (String)
|
28
|
-
# * :description (String)
|
29
|
-
# * :category (String)
|
30
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
31
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
32
|
-
# @example
|
33
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
34
|
-
# api.third_party_payers.v_1.create(request: { name: "string", description: "string", category: "string" })
|
35
|
-
def create(request:, request_options: nil)
|
36
|
-
response = @request_client.conn.post do |req|
|
37
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
38
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
39
|
-
req.headers = {
|
40
|
-
**(req.headers || {}),
|
41
|
-
**@request_client.get_headers,
|
42
|
-
**(request_options&.additional_headers || {})
|
43
|
-
}.compact
|
44
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
45
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
46
|
-
request_options: request_options)}/api/third-party-payers/v1"
|
47
|
-
end
|
48
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
49
|
-
end
|
50
|
-
|
51
|
-
# @param third_party_payer_id [String]
|
52
|
-
# @param request [Hash] Request of type CandidApiClient::ThirdPartyPayers::V1::Types::ToggleThirdPartyPayerEnablementRequest, as a Hash
|
53
|
-
# * :enabled (Boolean)
|
54
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
55
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
56
|
-
# @example
|
57
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
58
|
-
# api.third_party_payers.v_1.toggle_enablement(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { enabled: true })
|
59
|
-
def toggle_enablement(third_party_payer_id:, request:, request_options: nil)
|
60
|
-
response = @request_client.conn.patch do |req|
|
61
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
62
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
63
|
-
req.headers = {
|
64
|
-
**(req.headers || {}),
|
65
|
-
**@request_client.get_headers,
|
66
|
-
**(request_options&.additional_headers || {})
|
67
|
-
}.compact
|
68
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
69
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
70
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}/toggle_enablement"
|
71
|
-
end
|
72
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
73
|
-
end
|
74
|
-
|
75
|
-
# @param name [String]
|
76
|
-
# @param category [String]
|
77
|
-
# @param enabled [Boolean]
|
78
|
-
# @param sort [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerSortField]
|
79
|
-
# @param sort_direction [CandidApiClient::Commons::Types::SortDirection]
|
80
|
-
# @param limit [Integer] Defaults to 100
|
81
|
-
# @param page_token [String]
|
82
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
83
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerPage]
|
84
|
-
# @example
|
85
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
86
|
-
# api.third_party_payers.v_1.get_multi(
|
87
|
-
# name: "string",
|
88
|
-
# category: "string",
|
89
|
-
# enabled: true,
|
90
|
-
# sort: NAME,
|
91
|
-
# sort_direction: ASC,
|
92
|
-
# limit: 1,
|
93
|
-
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"
|
94
|
-
# )
|
95
|
-
def get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil,
|
96
|
-
page_token: nil, request_options: nil)
|
97
|
-
response = @request_client.conn.get do |req|
|
98
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
99
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
100
|
-
req.headers = {
|
101
|
-
**(req.headers || {}),
|
102
|
-
**@request_client.get_headers,
|
103
|
-
**(request_options&.additional_headers || {})
|
104
|
-
}.compact
|
105
|
-
req.params = {
|
106
|
-
**(request_options&.additional_query_parameters || {}),
|
107
|
-
"name": name,
|
108
|
-
"category": category,
|
109
|
-
"enabled": enabled,
|
110
|
-
"sort": sort,
|
111
|
-
"sort_direction": sort_direction,
|
112
|
-
"limit": limit,
|
113
|
-
"page_token": page_token
|
114
|
-
}.compact
|
115
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
116
|
-
request_options: request_options)}/api/third-party-payers/v1"
|
117
|
-
end
|
118
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerPage.from_json(json_object: response.body)
|
119
|
-
end
|
120
|
-
|
121
|
-
# @param third_party_payer_id [String]
|
122
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
123
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
124
|
-
# @example
|
125
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
126
|
-
# api.third_party_payers.v_1.get(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
127
|
-
def get(third_party_payer_id:, request_options: nil)
|
128
|
-
response = @request_client.conn.get do |req|
|
129
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
130
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
131
|
-
req.headers = {
|
132
|
-
**(req.headers || {}),
|
133
|
-
**@request_client.get_headers,
|
134
|
-
**(request_options&.additional_headers || {})
|
135
|
-
}.compact
|
136
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
137
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}"
|
138
|
-
end
|
139
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
140
|
-
end
|
141
|
-
|
142
|
-
# @param third_party_payer_id [String]
|
143
|
-
# @param request [Hash] Request of type CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerUpdateRequest, as a Hash
|
144
|
-
# * :name (String)
|
145
|
-
# * :description (Hash)
|
146
|
-
# * :category (Hash)
|
147
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
148
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
149
|
-
# @example
|
150
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
151
|
-
# api.third_party_payers.v_1.update(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { name: "string" })
|
152
|
-
def update(third_party_payer_id:, request:, request_options: nil)
|
153
|
-
response = @request_client.conn.patch do |req|
|
154
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
155
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
156
|
-
req.headers = {
|
157
|
-
**(req.headers || {}),
|
158
|
-
**@request_client.get_headers,
|
159
|
-
**(request_options&.additional_headers || {})
|
160
|
-
}.compact
|
161
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
162
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
163
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}"
|
164
|
-
end
|
165
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
166
|
-
end
|
167
|
-
|
168
|
-
# @param third_party_payer_id [String]
|
169
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
170
|
-
# @return [Void]
|
171
|
-
# @example
|
172
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
173
|
-
# api.third_party_payers.v_1.delete(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
174
|
-
def delete(third_party_payer_id:, request_options: nil)
|
175
|
-
@request_client.conn.delete do |req|
|
176
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
177
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
178
|
-
req.headers = {
|
179
|
-
**(req.headers || {}),
|
180
|
-
**@request_client.get_headers,
|
181
|
-
**(request_options&.additional_headers || {})
|
182
|
-
}.compact
|
183
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
184
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}"
|
185
|
-
end
|
186
|
-
end
|
187
|
-
end
|
188
|
-
|
189
|
-
class AsyncV1Client
|
190
|
-
# @return [CandidApiClient::AsyncRequestClient]
|
191
|
-
attr_reader :request_client
|
192
|
-
|
193
|
-
# @param request_client [CandidApiClient::AsyncRequestClient]
|
194
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::AsyncV1Client]
|
195
|
-
def initialize(request_client:)
|
196
|
-
@request_client = request_client
|
197
|
-
end
|
198
|
-
|
199
|
-
# @param request [Hash] Request of type CandidApiClient::ThirdPartyPayers::V1::Types::CreateThirdPartyPayerRequest, as a Hash
|
200
|
-
# * :name (String)
|
201
|
-
# * :description (String)
|
202
|
-
# * :category (String)
|
203
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
204
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
205
|
-
# @example
|
206
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
207
|
-
# api.third_party_payers.v_1.create(request: { name: "string", description: "string", category: "string" })
|
208
|
-
def create(request:, request_options: nil)
|
209
|
-
Async do
|
210
|
-
response = @request_client.conn.post do |req|
|
211
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
212
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
213
|
-
req.headers = {
|
214
|
-
**(req.headers || {}),
|
215
|
-
**@request_client.get_headers,
|
216
|
-
**(request_options&.additional_headers || {})
|
217
|
-
}.compact
|
218
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
219
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
220
|
-
request_options: request_options)}/api/third-party-payers/v1"
|
221
|
-
end
|
222
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
# @param third_party_payer_id [String]
|
227
|
-
# @param request [Hash] Request of type CandidApiClient::ThirdPartyPayers::V1::Types::ToggleThirdPartyPayerEnablementRequest, as a Hash
|
228
|
-
# * :enabled (Boolean)
|
229
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
230
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
231
|
-
# @example
|
232
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
233
|
-
# api.third_party_payers.v_1.toggle_enablement(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { enabled: true })
|
234
|
-
def toggle_enablement(third_party_payer_id:, request:, request_options: nil)
|
235
|
-
Async do
|
236
|
-
response = @request_client.conn.patch do |req|
|
237
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
238
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
239
|
-
req.headers = {
|
240
|
-
**(req.headers || {}),
|
241
|
-
**@request_client.get_headers,
|
242
|
-
**(request_options&.additional_headers || {})
|
243
|
-
}.compact
|
244
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
245
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
246
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}/toggle_enablement"
|
247
|
-
end
|
248
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
249
|
-
end
|
250
|
-
end
|
251
|
-
|
252
|
-
# @param name [String]
|
253
|
-
# @param category [String]
|
254
|
-
# @param enabled [Boolean]
|
255
|
-
# @param sort [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerSortField]
|
256
|
-
# @param sort_direction [CandidApiClient::Commons::Types::SortDirection]
|
257
|
-
# @param limit [Integer] Defaults to 100
|
258
|
-
# @param page_token [String]
|
259
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
260
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerPage]
|
261
|
-
# @example
|
262
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
263
|
-
# api.third_party_payers.v_1.get_multi(
|
264
|
-
# name: "string",
|
265
|
-
# category: "string",
|
266
|
-
# enabled: true,
|
267
|
-
# sort: NAME,
|
268
|
-
# sort_direction: ASC,
|
269
|
-
# limit: 1,
|
270
|
-
# page_token: "eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"
|
271
|
-
# )
|
272
|
-
def get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil,
|
273
|
-
page_token: nil, request_options: nil)
|
274
|
-
Async do
|
275
|
-
response = @request_client.conn.get do |req|
|
276
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
277
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
278
|
-
req.headers = {
|
279
|
-
**(req.headers || {}),
|
280
|
-
**@request_client.get_headers,
|
281
|
-
**(request_options&.additional_headers || {})
|
282
|
-
}.compact
|
283
|
-
req.params = {
|
284
|
-
**(request_options&.additional_query_parameters || {}),
|
285
|
-
"name": name,
|
286
|
-
"category": category,
|
287
|
-
"enabled": enabled,
|
288
|
-
"sort": sort,
|
289
|
-
"sort_direction": sort_direction,
|
290
|
-
"limit": limit,
|
291
|
-
"page_token": page_token
|
292
|
-
}.compact
|
293
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
294
|
-
request_options: request_options)}/api/third-party-payers/v1"
|
295
|
-
end
|
296
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerPage.from_json(json_object: response.body)
|
297
|
-
end
|
298
|
-
end
|
299
|
-
|
300
|
-
# @param third_party_payer_id [String]
|
301
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
302
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
303
|
-
# @example
|
304
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
305
|
-
# api.third_party_payers.v_1.get(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
306
|
-
def get(third_party_payer_id:, request_options: nil)
|
307
|
-
Async do
|
308
|
-
response = @request_client.conn.get do |req|
|
309
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
310
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
311
|
-
req.headers = {
|
312
|
-
**(req.headers || {}),
|
313
|
-
**@request_client.get_headers,
|
314
|
-
**(request_options&.additional_headers || {})
|
315
|
-
}.compact
|
316
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
317
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}"
|
318
|
-
end
|
319
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
320
|
-
end
|
321
|
-
end
|
322
|
-
|
323
|
-
# @param third_party_payer_id [String]
|
324
|
-
# @param request [Hash] Request of type CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerUpdateRequest, as a Hash
|
325
|
-
# * :name (String)
|
326
|
-
# * :description (Hash)
|
327
|
-
# * :category (Hash)
|
328
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
329
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
330
|
-
# @example
|
331
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
332
|
-
# api.third_party_payers.v_1.update(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { name: "string" })
|
333
|
-
def update(third_party_payer_id:, request:, request_options: nil)
|
334
|
-
Async do
|
335
|
-
response = @request_client.conn.patch do |req|
|
336
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
337
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
338
|
-
req.headers = {
|
339
|
-
**(req.headers || {}),
|
340
|
-
**@request_client.get_headers,
|
341
|
-
**(request_options&.additional_headers || {})
|
342
|
-
}.compact
|
343
|
-
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
344
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
345
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}"
|
346
|
-
end
|
347
|
-
CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer.from_json(json_object: response.body)
|
348
|
-
end
|
349
|
-
end
|
350
|
-
|
351
|
-
# @param third_party_payer_id [String]
|
352
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
353
|
-
# @return [Void]
|
354
|
-
# @example
|
355
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
356
|
-
# api.third_party_payers.v_1.delete(third_party_payer_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
357
|
-
def delete(third_party_payer_id:, request_options: nil)
|
358
|
-
Async do
|
359
|
-
@request_client.conn.delete do |req|
|
360
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
361
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
362
|
-
req.headers = {
|
363
|
-
**(req.headers || {}),
|
364
|
-
**@request_client.get_headers,
|
365
|
-
**(request_options&.additional_headers || {})
|
366
|
-
}.compact
|
367
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
368
|
-
request_options: request_options)}/api/third-party-payers/v1/#{third_party_payer_id}"
|
369
|
-
end
|
370
|
-
end
|
371
|
-
end
|
372
|
-
end
|
373
|
-
end
|
374
|
-
end
|
375
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module CandidApiClient
|
7
|
-
module ThirdPartyPayers
|
8
|
-
module V1
|
9
|
-
module Types
|
10
|
-
class CreateThirdPartyPayerRequest
|
11
|
-
# @return [String] Max 50 characters allowed
|
12
|
-
attr_reader :name
|
13
|
-
# @return [String] Max 255 characters allowed
|
14
|
-
attr_reader :description
|
15
|
-
# @return [String] Max 255 characters allowed
|
16
|
-
attr_reader :category
|
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 name [String] Max 50 characters allowed
|
26
|
-
# @param description [String] Max 255 characters allowed
|
27
|
-
# @param category [String] Max 255 characters allowed
|
28
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::CreateThirdPartyPayerRequest]
|
30
|
-
def initialize(name:, description: OMIT, category: OMIT, additional_properties: nil)
|
31
|
-
@name = name
|
32
|
-
@description = description if description != OMIT
|
33
|
-
@category = category if category != OMIT
|
34
|
-
@additional_properties = additional_properties
|
35
|
-
@_field_set = { "name": name, "description": description, "category": category }.reject do |_k, v|
|
36
|
-
v == OMIT
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# Deserialize a JSON object to an instance of CreateThirdPartyPayerRequest
|
41
|
-
#
|
42
|
-
# @param json_object [String]
|
43
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::CreateThirdPartyPayerRequest]
|
44
|
-
def self.from_json(json_object:)
|
45
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
46
|
-
name = struct["name"]
|
47
|
-
description = struct["description"]
|
48
|
-
category = struct["category"]
|
49
|
-
new(
|
50
|
-
name: name,
|
51
|
-
description: description,
|
52
|
-
category: category,
|
53
|
-
additional_properties: struct
|
54
|
-
)
|
55
|
-
end
|
56
|
-
|
57
|
-
# Serialize an instance of CreateThirdPartyPayerRequest to a JSON object
|
58
|
-
#
|
59
|
-
# @return [String]
|
60
|
-
def to_json(*_args)
|
61
|
-
@_field_set&.to_json
|
62
|
-
end
|
63
|
-
|
64
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
65
|
-
# hash and check each fields type against the current object's property
|
66
|
-
# definitions.
|
67
|
-
#
|
68
|
-
# @param obj [Object]
|
69
|
-
# @return [Void]
|
70
|
-
def self.validate_raw(obj:)
|
71
|
-
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
72
|
-
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
73
|
-
obj.category&.is_a?(String) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
@@ -1,100 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module CandidApiClient
|
7
|
-
module ThirdPartyPayers
|
8
|
-
module V1
|
9
|
-
module Types
|
10
|
-
class ThirdPartyPayer
|
11
|
-
# @return [String]
|
12
|
-
attr_reader :third_party_payer_id
|
13
|
-
# @return [String]
|
14
|
-
attr_reader :name
|
15
|
-
# @return [String]
|
16
|
-
attr_reader :description
|
17
|
-
# @return [String]
|
18
|
-
attr_reader :category
|
19
|
-
# @return [Boolean]
|
20
|
-
attr_reader :enabled
|
21
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
-
attr_reader :additional_properties
|
23
|
-
# @return [Object]
|
24
|
-
attr_reader :_field_set
|
25
|
-
protected :_field_set
|
26
|
-
|
27
|
-
OMIT = Object.new
|
28
|
-
|
29
|
-
# @param third_party_payer_id [String]
|
30
|
-
# @param name [String]
|
31
|
-
# @param description [String]
|
32
|
-
# @param category [String]
|
33
|
-
# @param enabled [Boolean]
|
34
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
35
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
36
|
-
def initialize(third_party_payer_id:, name:, enabled:, description: OMIT, category: OMIT,
|
37
|
-
additional_properties: nil)
|
38
|
-
@third_party_payer_id = third_party_payer_id
|
39
|
-
@name = name
|
40
|
-
@description = description if description != OMIT
|
41
|
-
@category = category if category != OMIT
|
42
|
-
@enabled = enabled
|
43
|
-
@additional_properties = additional_properties
|
44
|
-
@_field_set = {
|
45
|
-
"third_party_payer_id": third_party_payer_id,
|
46
|
-
"name": name,
|
47
|
-
"description": description,
|
48
|
-
"category": category,
|
49
|
-
"enabled": enabled
|
50
|
-
}.reject do |_k, v|
|
51
|
-
v == OMIT
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# Deserialize a JSON object to an instance of ThirdPartyPayer
|
56
|
-
#
|
57
|
-
# @param json_object [String]
|
58
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayer]
|
59
|
-
def self.from_json(json_object:)
|
60
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
61
|
-
third_party_payer_id = struct["third_party_payer_id"]
|
62
|
-
name = struct["name"]
|
63
|
-
description = struct["description"]
|
64
|
-
category = struct["category"]
|
65
|
-
enabled = struct["enabled"]
|
66
|
-
new(
|
67
|
-
third_party_payer_id: third_party_payer_id,
|
68
|
-
name: name,
|
69
|
-
description: description,
|
70
|
-
category: category,
|
71
|
-
enabled: enabled,
|
72
|
-
additional_properties: struct
|
73
|
-
)
|
74
|
-
end
|
75
|
-
|
76
|
-
# Serialize an instance of ThirdPartyPayer to a JSON object
|
77
|
-
#
|
78
|
-
# @return [String]
|
79
|
-
def to_json(*_args)
|
80
|
-
@_field_set&.to_json
|
81
|
-
end
|
82
|
-
|
83
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
84
|
-
# hash and check each fields type against the current object's property
|
85
|
-
# definitions.
|
86
|
-
#
|
87
|
-
# @param obj [Object]
|
88
|
-
# @return [Void]
|
89
|
-
def self.validate_raw(obj:)
|
90
|
-
obj.third_party_payer_id.is_a?(String) != false || raise("Passed value for field obj.third_party_payer_id is not the expected type, validation failed.")
|
91
|
-
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
92
|
-
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
93
|
-
obj.category&.is_a?(String) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
|
94
|
-
obj.enabled.is_a?(Boolean) != false || raise("Passed value for field obj.enabled is not the expected type, validation failed.")
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
@@ -1,97 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "json"
|
4
|
-
|
5
|
-
module CandidApiClient
|
6
|
-
module ThirdPartyPayers
|
7
|
-
module V1
|
8
|
-
module Types
|
9
|
-
class ThirdPartyPayerCategoryUpdate
|
10
|
-
# @return [Object]
|
11
|
-
attr_reader :member
|
12
|
-
# @return [String]
|
13
|
-
attr_reader :discriminant
|
14
|
-
|
15
|
-
private_class_method :new
|
16
|
-
alias kind_of? is_a?
|
17
|
-
|
18
|
-
# @param member [Object]
|
19
|
-
# @param discriminant [String]
|
20
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerCategoryUpdate]
|
21
|
-
def initialize(member:, discriminant:)
|
22
|
-
@member = member
|
23
|
-
@discriminant = discriminant
|
24
|
-
end
|
25
|
-
|
26
|
-
# Deserialize a JSON object to an instance of ThirdPartyPayerCategoryUpdate
|
27
|
-
#
|
28
|
-
# @param json_object [String]
|
29
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerCategoryUpdate]
|
30
|
-
def self.from_json(json_object:)
|
31
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
-
member = case struct.type
|
33
|
-
when "remove"
|
34
|
-
nil
|
35
|
-
when "set"
|
36
|
-
json_object.value
|
37
|
-
else
|
38
|
-
json_object
|
39
|
-
end
|
40
|
-
new(member: member, discriminant: struct.type)
|
41
|
-
end
|
42
|
-
|
43
|
-
# For Union Types, to_json functionality is delegated to the wrapped member.
|
44
|
-
#
|
45
|
-
# @return [String]
|
46
|
-
def to_json(*_args)
|
47
|
-
case @discriminant
|
48
|
-
when "remove"
|
49
|
-
{ type: @discriminant }.to_json
|
50
|
-
when "set"
|
51
|
-
{ "type": @discriminant, "value": @member }.to_json
|
52
|
-
else
|
53
|
-
{ "type": @discriminant, value: @member }.to_json
|
54
|
-
end
|
55
|
-
@member.to_json
|
56
|
-
end
|
57
|
-
|
58
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
59
|
-
# hash and check each fields type against the current object's property
|
60
|
-
# definitions.
|
61
|
-
#
|
62
|
-
# @param obj [Object]
|
63
|
-
# @return [Void]
|
64
|
-
def self.validate_raw(obj:)
|
65
|
-
case obj.type
|
66
|
-
when "remove"
|
67
|
-
# noop
|
68
|
-
when "set"
|
69
|
-
obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
70
|
-
else
|
71
|
-
raise("Passed value matched no type within the union, validation failed.")
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# For Union Types, is_a? functionality is delegated to the wrapped member.
|
76
|
-
#
|
77
|
-
# @param obj [Object]
|
78
|
-
# @return [Boolean]
|
79
|
-
def is_a?(obj)
|
80
|
-
@member.is_a?(obj)
|
81
|
-
end
|
82
|
-
|
83
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerCategoryUpdate]
|
84
|
-
def self.remove
|
85
|
-
new(member: nil, discriminant: "remove")
|
86
|
-
end
|
87
|
-
|
88
|
-
# @param member [String]
|
89
|
-
# @return [CandidApiClient::ThirdPartyPayers::V1::Types::ThirdPartyPayerCategoryUpdate]
|
90
|
-
def self.set(member:)
|
91
|
-
new(member: member, discriminant: "set")
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|