candidhealth 0.24.6 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/v_2/client.rb +2 -2
  3. data/lib/candidhealth/billing_notes/v_2/client.rb +2 -2
  4. data/lib/candidhealth/contracts/v_2/client.rb +10 -10
  5. data/lib/candidhealth/custom_schemas/v_1/client.rb +8 -8
  6. data/lib/candidhealth/eligibility/v_2/client.rb +6 -6
  7. data/lib/candidhealth/encounters/v_4/client.rb +8 -8
  8. data/lib/candidhealth/expected_network_status/v_1/client.rb +2 -2
  9. data/lib/candidhealth/expected_network_status/v_2/client.rb +4 -4
  10. data/lib/candidhealth/exports/v_3/client.rb +2 -2
  11. data/lib/candidhealth/external_payment_account_config/v_1/client.rb +2 -2
  12. data/lib/candidhealth/fee_schedules/v_3/client.rb +20 -20
  13. data/lib/candidhealth/financials/types/allocation_target.rb +13 -0
  14. data/lib/candidhealth/financials/types/allocation_target_create.rb +12 -0
  15. data/lib/candidhealth/financials/types/appointment_allocation_target.rb +58 -0
  16. data/lib/candidhealth/guarantor/v_1/client.rb +6 -6
  17. data/lib/candidhealth/import_invoice/v_1/client.rb +8 -8
  18. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +6 -6
  19. data/lib/candidhealth/insurance_payments/v_1/client.rb +10 -10
  20. data/lib/candidhealth/insurance_refunds/v_1/client.rb +10 -10
  21. data/lib/candidhealth/organization_providers/v_3/client.rb +8 -8
  22. data/lib/candidhealth/organization_service_facilities/v_2/client.rb +10 -10
  23. data/lib/candidhealth/patient_payments/v_4/client.rb +10 -10
  24. data/lib/candidhealth/patient_refunds/v_1/client.rb +10 -10
  25. data/lib/candidhealth/payers/v_3/client.rb +4 -4
  26. data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +129 -0
  27. data/lib/candidhealth/pre_encounter/common/types/external_provider_type.rb +14 -0
  28. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +28 -24
  29. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +13 -4
  30. data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +86 -0
  31. data/lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb +5 -0
  32. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +10 -10
  33. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +22 -22
  34. data/lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb +1 -11
  35. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +14 -10
  36. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -9
  37. data/lib/candidhealth/service_facility/client.rb +2 -2
  38. data/lib/candidhealth/service_lines/client.rb +30 -0
  39. data/lib/candidhealth/service_lines/v_2/client.rb +229 -0
  40. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +279 -0
  41. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +281 -0
  42. data/lib/candidhealth/tasks/v_3/client.rb +10 -10
  43. data/lib/candidhealth/write_offs/v_1/client.rb +8 -8
  44. data/lib/candidhealth/write_offs/v_1/types/patient_write_off.rb +18 -2
  45. data/lib/candidhealth.rb +9 -2
  46. data/lib/environment.rb +8 -0
  47. data/lib/requests.rb +6 -4
  48. data/lib/types_export.rb +6 -1
  49. metadata +10 -3
  50. data/lib/candidhealth/pre_encounter/patients/v_1/types/external_provider.rb +0 -122
@@ -24,7 +24,7 @@ module CandidApiClient
24
24
  # @param request_options [CandidApiClient::RequestOptions]
25
25
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility]
26
26
  # @example
27
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
27
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
28
28
  # api.organization_service_facilities.v_2.get(organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569")
29
29
  def get(organization_service_facility_id:, request_options: nil)
30
30
  response = @request_client.conn.get do |req|
@@ -47,7 +47,7 @@ module CandidApiClient
47
47
  # @param request_options [CandidApiClient::RequestOptions]
48
48
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage]
49
49
  # @example
50
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
50
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
51
51
  # api.organization_service_facilities.v_2.get_multi(
52
52
  # limit: 100,
53
53
  # name: "Test Service Facility",
@@ -95,7 +95,7 @@ module CandidApiClient
95
95
  # @param request_options [CandidApiClient::RequestOptions]
96
96
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility]
97
97
  # @example
98
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
98
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
99
99
  # api.organization_service_facilities.v_2.create(request: { name: "Test Service Facility", aliases: ["Test Service Facility Alias"], description: "Test Service Facility Description", status: ACTIVE, operational_status: CLOSED, mode: INSTANCE, type: DIAGNOSTICS_OR_THERAPEUTICS_UNIT, physical_type: SITE, telecoms: ["555-555-5555"], address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
100
100
  def create(request:, request_options: nil)
101
101
  response = @request_client.conn.post do |req|
@@ -135,7 +135,7 @@ module CandidApiClient
135
135
  # @param request_options [CandidApiClient::RequestOptions]
136
136
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility]
137
137
  # @example
138
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
138
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
139
139
  # api.organization_service_facilities.v_2.update(organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569", request: { name: "Test Service Facility", aliases: ["Test Service Facility Alias"], description: "Test Service Facility Description", status: ACTIVE, operational_status: CLOSED, mode: INSTANCE, type: DIAGNOSTICS_OR_THERAPEUTICS_UNIT, physical_type: SITE, telecoms: ["555-555-5555"], address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
140
140
  def update(organization_service_facility_id:, request:, request_options: nil)
141
141
  response = @request_client.conn.patch do |req|
@@ -157,7 +157,7 @@ module CandidApiClient
157
157
  # @param request_options [CandidApiClient::RequestOptions]
158
158
  # @return [Void]
159
159
  # @example
160
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
160
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
161
161
  # api.organization_service_facilities.v_2.delete(organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569")
162
162
  def delete(organization_service_facility_id:, request_options: nil)
163
163
  @request_client.conn.delete do |req|
@@ -188,7 +188,7 @@ module CandidApiClient
188
188
  # @param request_options [CandidApiClient::RequestOptions]
189
189
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility]
190
190
  # @example
191
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
191
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
192
192
  # api.organization_service_facilities.v_2.get(organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569")
193
193
  def get(organization_service_facility_id:, request_options: nil)
194
194
  Async do
@@ -213,7 +213,7 @@ module CandidApiClient
213
213
  # @param request_options [CandidApiClient::RequestOptions]
214
214
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage]
215
215
  # @example
216
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
216
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
217
217
  # api.organization_service_facilities.v_2.get_multi(
218
218
  # limit: 100,
219
219
  # name: "Test Service Facility",
@@ -263,7 +263,7 @@ module CandidApiClient
263
263
  # @param request_options [CandidApiClient::RequestOptions]
264
264
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility]
265
265
  # @example
266
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
266
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
267
267
  # api.organization_service_facilities.v_2.create(request: { name: "Test Service Facility", aliases: ["Test Service Facility Alias"], description: "Test Service Facility Description", status: ACTIVE, operational_status: CLOSED, mode: INSTANCE, type: DIAGNOSTICS_OR_THERAPEUTICS_UNIT, physical_type: SITE, telecoms: ["555-555-5555"], address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
268
268
  def create(request:, request_options: nil)
269
269
  Async do
@@ -305,7 +305,7 @@ module CandidApiClient
305
305
  # @param request_options [CandidApiClient::RequestOptions]
306
306
  # @return [CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility]
307
307
  # @example
308
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
308
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
309
309
  # api.organization_service_facilities.v_2.update(organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569", request: { name: "Test Service Facility", aliases: ["Test Service Facility Alias"], description: "Test Service Facility Description", status: ACTIVE, operational_status: CLOSED, mode: INSTANCE, type: DIAGNOSTICS_OR_THERAPEUTICS_UNIT, physical_type: SITE, telecoms: ["555-555-5555"], address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
310
310
  def update(organization_service_facility_id:, request:, request_options: nil)
311
311
  Async do
@@ -329,7 +329,7 @@ module CandidApiClient
329
329
  # @param request_options [CandidApiClient::RequestOptions]
330
330
  # @return [Void]
331
331
  # @example
332
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
332
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
333
333
  # api.organization_service_facilities.v_2.delete(organization_service_facility_id: "30F55EE6-8C0E-43FC-A7FC-DAC00D5BF569")
334
334
  def delete(organization_service_facility_id:, request_options: nil)
335
335
  Async do
@@ -43,7 +43,7 @@ module CandidApiClient
43
43
  # @param request_options [CandidApiClient::RequestOptions]
44
44
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPaymentsPage]
45
45
  # @example
46
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
46
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
47
47
  # api.patient_payments.v_4.get_multi(
48
48
  # limit: 1,
49
49
  # patient_external_id: "string",
@@ -93,7 +93,7 @@ module CandidApiClient
93
93
  # @param request_options [CandidApiClient::RequestOptions]
94
94
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPayment]
95
95
  # @example
96
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
96
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
97
97
  # api.patient_payments.v_4.get(patient_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
98
98
  def get(patient_payment_id:, request_options: nil)
99
99
  response = @request_client.conn.get do |req|
@@ -127,7 +127,7 @@ module CandidApiClient
127
127
  # @param request_options [CandidApiClient::RequestOptions]
128
128
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPayment]
129
129
  # @example
130
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
130
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
131
131
  # api.patient_payments.v_4.create(
132
132
  # amount_cents: 1,
133
133
  # payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
@@ -170,7 +170,7 @@ module CandidApiClient
170
170
  # @param request_options [CandidApiClient::RequestOptions]
171
171
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPayment]
172
172
  # @example
173
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
173
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
174
174
  # api.patient_payments.v_4.update(patient_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
175
175
  def update(patient_payment_id:, payment_timestamp: nil, payment_note: nil, invoice: nil, request_options: nil)
176
176
  response = @request_client.conn.patch do |req|
@@ -199,7 +199,7 @@ module CandidApiClient
199
199
  # @param request_options [CandidApiClient::RequestOptions]
200
200
  # @return [Void]
201
201
  # @example
202
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
202
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
203
203
  # api.patient_payments.v_4.delete(patient_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
204
204
  def delete(patient_payment_id:, request_options: nil)
205
205
  @request_client.conn.delete do |req|
@@ -244,7 +244,7 @@ module CandidApiClient
244
244
  # @param request_options [CandidApiClient::RequestOptions]
245
245
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPaymentsPage]
246
246
  # @example
247
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
247
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
248
248
  # api.patient_payments.v_4.get_multi(
249
249
  # limit: 1,
250
250
  # patient_external_id: "string",
@@ -296,7 +296,7 @@ module CandidApiClient
296
296
  # @param request_options [CandidApiClient::RequestOptions]
297
297
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPayment]
298
298
  # @example
299
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
299
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
300
300
  # api.patient_payments.v_4.get(patient_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
301
301
  def get(patient_payment_id:, request_options: nil)
302
302
  Async do
@@ -332,7 +332,7 @@ module CandidApiClient
332
332
  # @param request_options [CandidApiClient::RequestOptions]
333
333
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPayment]
334
334
  # @example
335
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
335
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
336
336
  # api.patient_payments.v_4.create(
337
337
  # amount_cents: 1,
338
338
  # payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
@@ -377,7 +377,7 @@ module CandidApiClient
377
377
  # @param request_options [CandidApiClient::RequestOptions]
378
378
  # @return [CandidApiClient::PatientPayments::V4::Types::PatientPayment]
379
379
  # @example
380
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
380
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
381
381
  # api.patient_payments.v_4.update(patient_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", payment_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
382
382
  def update(patient_payment_id:, payment_timestamp: nil, payment_note: nil, invoice: nil, request_options: nil)
383
383
  Async do
@@ -408,7 +408,7 @@ module CandidApiClient
408
408
  # @param request_options [CandidApiClient::RequestOptions]
409
409
  # @return [Void]
410
410
  # @example
411
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
411
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
412
412
  # api.patient_payments.v_4.delete(patient_payment_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
413
413
  def delete(patient_payment_id:, request_options: nil)
414
414
  Async do
@@ -45,7 +45,7 @@ module CandidApiClient
45
45
  # @param request_options [CandidApiClient::RequestOptions]
46
46
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefundsPage]
47
47
  # @example
48
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
48
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
49
49
  # api.patient_refunds.v_1.get_multi(
50
50
  # limit: 1,
51
51
  # patient_external_id: "string",
@@ -95,7 +95,7 @@ module CandidApiClient
95
95
  # @param request_options [CandidApiClient::RequestOptions]
96
96
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
97
97
  # @example
98
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
98
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
99
99
  # api.patient_refunds.v_1.get(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
100
100
  def get(patient_refund_id:, request_options: nil)
101
101
  response = @request_client.conn.get do |req|
@@ -130,7 +130,7 @@ module CandidApiClient
130
130
  # @param request_options [CandidApiClient::RequestOptions]
131
131
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
132
132
  # @example
133
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
133
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
134
134
  # api.patient_refunds.v_1.create(
135
135
  # amount_cents: 1,
136
136
  # refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
@@ -176,7 +176,7 @@ module CandidApiClient
176
176
  # @param request_options [CandidApiClient::RequestOptions]
177
177
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
178
178
  # @example
179
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
179
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
180
180
  # api.patient_refunds.v_1.update(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
181
181
  def update(patient_refund_id:, refund_timestamp: nil, refund_note: nil, invoice: nil, refund_reason: nil,
182
182
  request_options: nil)
@@ -207,7 +207,7 @@ module CandidApiClient
207
207
  # @param request_options [CandidApiClient::RequestOptions]
208
208
  # @return [Void]
209
209
  # @example
210
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
210
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
211
211
  # api.patient_refunds.v_1.delete(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
212
212
  def delete(patient_refund_id:, request_options: nil)
213
213
  @request_client.conn.delete do |req|
@@ -252,7 +252,7 @@ module CandidApiClient
252
252
  # @param request_options [CandidApiClient::RequestOptions]
253
253
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefundsPage]
254
254
  # @example
255
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
255
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
256
256
  # api.patient_refunds.v_1.get_multi(
257
257
  # limit: 1,
258
258
  # patient_external_id: "string",
@@ -304,7 +304,7 @@ module CandidApiClient
304
304
  # @param request_options [CandidApiClient::RequestOptions]
305
305
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
306
306
  # @example
307
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
307
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
308
308
  # api.patient_refunds.v_1.get(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
309
309
  def get(patient_refund_id:, request_options: nil)
310
310
  Async do
@@ -341,7 +341,7 @@ module CandidApiClient
341
341
  # @param request_options [CandidApiClient::RequestOptions]
342
342
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
343
343
  # @example
344
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
344
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
345
345
  # api.patient_refunds.v_1.create(
346
346
  # amount_cents: 1,
347
347
  # refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z),
@@ -389,7 +389,7 @@ module CandidApiClient
389
389
  # @param request_options [CandidApiClient::RequestOptions]
390
390
  # @return [CandidApiClient::PatientRefunds::V1::Types::PatientRefund]
391
391
  # @example
392
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
392
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
393
393
  # api.patient_refunds.v_1.update(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", refund_timestamp: DateTime.parse(2024-01-15T09:30:00.000Z))
394
394
  def update(patient_refund_id:, refund_timestamp: nil, refund_note: nil, invoice: nil, refund_reason: nil,
395
395
  request_options: nil)
@@ -422,7 +422,7 @@ module CandidApiClient
422
422
  # @param request_options [CandidApiClient::RequestOptions]
423
423
  # @return [Void]
424
424
  # @example
425
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
425
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
426
426
  # api.patient_refunds.v_1.delete(patient_refund_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
427
427
  def delete(patient_refund_id:, request_options: nil)
428
428
  Async do
@@ -22,7 +22,7 @@ module CandidApiClient
22
22
  # @param request_options [CandidApiClient::RequestOptions]
23
23
  # @return [CandidApiClient::Payers::V3::Types::Payer]
24
24
  # @example
25
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
25
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
26
26
  # api.payers.v_3.get(payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
27
27
  def get(payer_uuid:, request_options: nil)
28
28
  response = @request_client.conn.get do |req|
@@ -45,7 +45,7 @@ module CandidApiClient
45
45
  # @param request_options [CandidApiClient::RequestOptions]
46
46
  # @return [CandidApiClient::Payers::V3::Types::PayerPage]
47
47
  # @example
48
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
48
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
49
49
  # api.payers.v_3.get_all(
50
50
  # limit: 100,
51
51
  # search_term: "john",
@@ -86,7 +86,7 @@ module CandidApiClient
86
86
  # @param request_options [CandidApiClient::RequestOptions]
87
87
  # @return [CandidApiClient::Payers::V3::Types::Payer]
88
88
  # @example
89
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
89
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
90
90
  # api.payers.v_3.get(payer_uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
91
91
  def get(payer_uuid:, request_options: nil)
92
92
  Async do
@@ -111,7 +111,7 @@ module CandidApiClient
111
111
  # @param request_options [CandidApiClient::RequestOptions]
112
112
  # @return [CandidApiClient::Payers::V3::Types::PayerPage]
113
113
  # @example
114
- # api = CandidApiClient::Client.new(base_url: "https://api.example.com")
114
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
115
115
  # api.payers.v_3.get_all(
116
116
  # limit: 100,
117
117
  # search_term: "john",
@@ -0,0 +1,129 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "human_name"
4
+ require_relative "external_provider_type"
5
+ require_relative "contact_point"
6
+ require_relative "address"
7
+ require_relative "period"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module CandidApiClient
12
+ module PreEncounter
13
+ module Common
14
+ module Types
15
+ class ExternalProvider
16
+ # @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
17
+ attr_reader :name
18
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProviderType]
19
+ attr_reader :type
20
+ # @return [String]
21
+ attr_reader :npi
22
+ # @return [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
23
+ attr_reader :telecoms
24
+ # @return [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
25
+ attr_reader :addresses
26
+ # @return [CandidApiClient::PreEncounter::Common::Types::Period]
27
+ attr_reader :period
28
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
29
+ attr_reader :additional_properties
30
+ # @return [Object]
31
+ attr_reader :_field_set
32
+ protected :_field_set
33
+
34
+ OMIT = Object.new
35
+
36
+ # @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
37
+ # @param type [CandidApiClient::PreEncounter::Common::Types::ExternalProviderType]
38
+ # @param npi [String]
39
+ # @param telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>]
40
+ # @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
41
+ # @param period [CandidApiClient::PreEncounter::Common::Types::Period]
42
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
43
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
44
+ def initialize(name:, telecoms:, addresses:, type: OMIT, npi: OMIT, period: OMIT, additional_properties: nil)
45
+ @name = name
46
+ @type = type if type != OMIT
47
+ @npi = npi if npi != OMIT
48
+ @telecoms = telecoms
49
+ @addresses = addresses
50
+ @period = period if period != OMIT
51
+ @additional_properties = additional_properties
52
+ @_field_set = {
53
+ "name": name,
54
+ "type": type,
55
+ "npi": npi,
56
+ "telecoms": telecoms,
57
+ "addresses": addresses,
58
+ "period": period
59
+ }.reject do |_k, v|
60
+ v == OMIT
61
+ end
62
+ end
63
+
64
+ # Deserialize a JSON object to an instance of ExternalProvider
65
+ #
66
+ # @param json_object [String]
67
+ # @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
68
+ def self.from_json(json_object:)
69
+ struct = JSON.parse(json_object, object_class: OpenStruct)
70
+ parsed_json = JSON.parse(json_object)
71
+ if parsed_json["name"].nil?
72
+ name = nil
73
+ else
74
+ name = parsed_json["name"].to_json
75
+ name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
76
+ end
77
+ type = struct["type"]
78
+ npi = struct["npi"]
79
+ telecoms = parsed_json["telecoms"]&.map do |item|
80
+ item = item.to_json
81
+ CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
82
+ end
83
+ addresses = parsed_json["addresses"]&.map do |item|
84
+ item = item.to_json
85
+ CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: item)
86
+ end
87
+ if parsed_json["period"].nil?
88
+ period = nil
89
+ else
90
+ period = parsed_json["period"].to_json
91
+ period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
92
+ end
93
+ new(
94
+ name: name,
95
+ type: type,
96
+ npi: npi,
97
+ telecoms: telecoms,
98
+ addresses: addresses,
99
+ period: period,
100
+ additional_properties: struct
101
+ )
102
+ end
103
+
104
+ # Serialize an instance of ExternalProvider to a JSON object
105
+ #
106
+ # @return [String]
107
+ def to_json(*_args)
108
+ @_field_set&.to_json
109
+ end
110
+
111
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
112
+ # hash and check each fields type against the current object's property
113
+ # definitions.
114
+ #
115
+ # @param obj [Object]
116
+ # @return [Void]
117
+ def self.validate_raw(obj:)
118
+ CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
119
+ obj.type&.is_a?(CandidApiClient::PreEncounter::Common::Types::ExternalProviderType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
120
+ obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
121
+ obj.telecoms.is_a?(Array) != false || raise("Passed value for field obj.telecoms is not the expected type, validation failed.")
122
+ obj.addresses.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
123
+ obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PreEncounter
5
+ module Common
6
+ module Types
7
+ class ExternalProviderType
8
+ PRIMARY = "PRIMARY"
9
+ REFERRING = "REFERRING"
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end