candidhealth 1.16.0 → 1.17.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candid/client.rb +1 -1
  3. data/lib/candid/contracts/client.rb +5 -0
  4. data/lib/candid/contracts/v_2/client.rb +4 -0
  5. data/lib/candid/contracts/v_3/client.rb +176 -0
  6. data/lib/candid/contracts/v_3/types/contract.rb +18 -0
  7. data/lib/candid/contracts/v_3/types/contract_base.rb +28 -0
  8. data/lib/candid/contracts/v_3/types/contract_create.rb +15 -0
  9. data/lib/candid/contracts/v_3/types/contract_create_union.rb +18 -0
  10. data/lib/candid/contracts/v_3/types/contract_service_facility.rb +14 -0
  11. data/lib/candid/contracts/v_3/types/contract_service_facility_base.rb +14 -0
  12. data/lib/candid/contracts/v_3/types/contract_service_facility_create.rb +15 -0
  13. data/lib/candid/contracts/v_3/types/contract_service_facility_update.rb +16 -0
  14. data/lib/candid/contracts/v_3/types/contract_type.rb +16 -0
  15. data/lib/candid/contracts/v_3/types/contract_union.rb +18 -0
  16. data/lib/candid/contracts/v_3/types/contract_update.rb +28 -0
  17. data/lib/candid/contracts/v_3/types/contract_update_union.rb +18 -0
  18. data/lib/candid/contracts/v_3/types/contract_with_providers_union.rb +18 -0
  19. data/lib/candid/contracts/v_3/types/contracts_page.rb +15 -0
  20. data/lib/candid/contracts/v_3/types/get_multi_contracts_request.rb +22 -0
  21. data/lib/candid/contracts/v_3/types/institutional_contract.rb +15 -0
  22. data/lib/candid/contracts/v_3/types/institutional_contract_create.rb +15 -0
  23. data/lib/candid/contracts/v_3/types/institutional_contract_update.rb +13 -0
  24. data/lib/candid/contracts/v_3/types/professional_contract.rb +13 -0
  25. data/lib/candid/contracts/v_3/types/professional_contract_create.rb +13 -0
  26. data/lib/candid/contracts/v_3/types/professional_contract_update.rb +13 -0
  27. data/lib/candid/version.rb +1 -1
  28. data/lib/candid.rb +22 -0
  29. data/reference.md +434 -0
  30. metadata +23 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6895f5f4be310fc99a79e4a950741d7a52ab05cc8e15a1d62d7a7fea6f63a344
4
- data.tar.gz: 1ffc220cda0f77fa7f57e9d7e78748d1eb1384ef0d69522c533f51086b7d99f8
3
+ metadata.gz: 853cc42ee8abf8c4143310b93223536552422f6b5df3a3985c39eb0e37426464
4
+ data.tar.gz: 8a38a7886555681dcc72f0a9169196a9c98d3d372cdfecd2894311fdf2a13979
5
5
  SHA512:
6
- metadata.gz: ee354cd3227e7868dbda9c9a4342dbafcd75ee316cde74ecb763f33c1f8819e3d8a149f847ee45da4aab45f323d952410df06c4d06395a840be8fafe209e79b1
7
- data.tar.gz: 7dff42df91a60ee25188ef4832100e616b8713514465b74056fb238ff8145f3a9cd71f23b23c29da54d598c432498da9119eee3cd6fb39b31b62c56b503263ec
6
+ metadata.gz: 2266e660bc9202a895da85672882c61e5909d30e4ea56bdbb6132e859797ea5e345b573651d7d5c7f4a22aa6911e599931f69d1ae4d0c7ca5af23399768d6140
7
+ data.tar.gz: 98ed5edbe35a94a3b2bda0f88c35a8277bf017524a6738bf318c617c1fc68f8c15cc2dafb9384497a16644536e30195268c1b57eb9698df13e8097f403d6bc25
data/lib/candid/client.rb CHANGED
@@ -7,7 +7,7 @@ module Candid
7
7
  @raw_client = Candid::Internal::Http::RawClient.new(
8
8
  base_url: base_url,
9
9
  headers: {
10
- "User-Agent": "candidhealth/1.16.0",
10
+ "User-Agent": "candidhealth/1.17.0",
11
11
  "X-Fern-Language": "Ruby"
12
12
  }
13
13
  )
@@ -12,6 +12,11 @@ module Candid
12
12
  def v_2
13
13
  @v_2 ||= Candid::Contracts::V2::Client.new(client: @client)
14
14
  end
15
+
16
+ # @return [Candid::V3::Client]
17
+ def v_3
18
+ @v_3 ||= Candid::Contracts::V3::Client.new(client: @client)
19
+ end
15
20
  end
16
21
  end
17
22
  end
@@ -9,6 +9,8 @@ module Candid
9
9
  @client = client
10
10
  end
11
11
 
12
+ # This API provides access to Professional Contracts. For Professional and Institutional Contracts use Contracts V3.
13
+ #
12
14
  # @return [Candid::Contracts::V2::Types::ContractWithProviders]
13
15
  def get(request_options: {}, **params)
14
16
  _request = Candid::Internal::JSON::Request.new(
@@ -30,6 +32,8 @@ module Candid
30
32
  end
31
33
  end
32
34
 
35
+ # This API provides access to Professional Contracts. For Professional and Institutional Contracts use Contracts V3.
36
+ #
33
37
  # @return [Candid::Contracts::V2::Types::ContractsPage]
34
38
  def get_multi(request_options: {}, **params)
35
39
  params = Candid::Internal::Types::Utils.symbolize_keys(params)
@@ -0,0 +1,176 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ class Client
7
+ # @return [Candid::Contracts::V3::Client]
8
+ def initialize(client:)
9
+ @client = client
10
+ end
11
+
12
+ # @return [Candid::Contracts::V3::Types::ContractWithProvidersUnion]
13
+ def get(request_options: {}, **params)
14
+ _request = Candid::Internal::JSON::Request.new(
15
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
16
+ method: "GET",
17
+ path: "/api/contracts/v3/#{params[:contract_id]}"
18
+ )
19
+ begin
20
+ _response = @client.send(_request)
21
+ rescue Net::HTTPRequestTimeout
22
+ raise Candid::Errors::TimeoutError
23
+ end
24
+ code = _response.code.to_i
25
+ if code.between?(200, 299)
26
+ Candid::Contracts::V3::Types::ContractWithProvidersUnion.load(_response.body)
27
+ else
28
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
29
+ raise error_class.new(_response.body, code: code)
30
+ end
31
+ end
32
+
33
+ # @return [Candid::Contracts::V3::Types::ContractsPage]
34
+ def get_multi(request_options: {}, **params)
35
+ params = Candid::Internal::Types::Utils.symbolize_keys(params)
36
+ _query_param_names = %i[page_token limit type contracting_provider_id rendering_provider_ids payer_names
37
+ states contract_status sort sort_direction]
38
+ _query = params.slice(*_query_param_names)
39
+ params.except(*_query_param_names)
40
+
41
+ _request = Candid::Internal::JSON::Request.new(
42
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
43
+ method: "GET",
44
+ path: "/api/contracts/v3",
45
+ query: _query
46
+ )
47
+ begin
48
+ _response = @client.send(_request)
49
+ rescue Net::HTTPRequestTimeout
50
+ raise Candid::Errors::TimeoutError
51
+ end
52
+ code = _response.code.to_i
53
+ if code.between?(200, 299)
54
+ Candid::Contracts::V3::Types::ContractsPage.load(_response.body)
55
+ else
56
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
57
+ raise error_class.new(_response.body, code: code)
58
+ end
59
+ end
60
+
61
+ # Creates a new contract within the user's current organization
62
+ #
63
+ # @return [Candid::Contracts::V3::Types::ContractWithProvidersUnion]
64
+ def create(request_options: {}, **params)
65
+ _request = Candid::Internal::JSON::Request.new(
66
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
67
+ method: "POST",
68
+ path: "/api/contracts/v3",
69
+ body: Candid::Contracts::V3::Types::ContractCreateUnion.new(params).to_h
70
+ )
71
+ begin
72
+ _response = @client.send(_request)
73
+ rescue Net::HTTPRequestTimeout
74
+ raise Candid::Errors::TimeoutError
75
+ end
76
+ code = _response.code.to_i
77
+ if code.between?(200, 299)
78
+ Candid::Contracts::V3::Types::ContractWithProvidersUnion.load(_response.body)
79
+ else
80
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
81
+ raise error_class.new(_response.body, code: code)
82
+ end
83
+ end
84
+
85
+ # @return [untyped]
86
+ def delete(request_options: {}, **params)
87
+ _request = Candid::Internal::JSON::Request.new(
88
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
89
+ method: "DELETE",
90
+ path: "/api/contracts/v3/#{params[:contract_id]}"
91
+ )
92
+ begin
93
+ _response = @client.send(_request)
94
+ rescue Net::HTTPRequestTimeout
95
+ raise Candid::Errors::TimeoutError
96
+ end
97
+ code = _response.code.to_i
98
+ return if code.between?(200, 299)
99
+
100
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
101
+ raise error_class.new(_response.body, code: code)
102
+ end
103
+
104
+ # @return [Candid::Contracts::V3::Types::ContractWithProvidersUnion]
105
+ def update(request_options: {}, **params)
106
+ _request = Candid::Internal::JSON::Request.new(
107
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
108
+ method: "PATCH",
109
+ path: "/api/contracts/v3/#{params[:contract_id]}",
110
+ body: Candid::Contracts::V3::Types::ContractUpdateUnion.new(params).to_h
111
+ )
112
+ begin
113
+ _response = @client.send(_request)
114
+ rescue Net::HTTPRequestTimeout
115
+ raise Candid::Errors::TimeoutError
116
+ end
117
+ code = _response.code.to_i
118
+ if code.between?(200, 299)
119
+ Candid::Contracts::V3::Types::ContractWithProvidersUnion.load(_response.body)
120
+ else
121
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
122
+ raise error_class.new(_response.body, code: code)
123
+ end
124
+ end
125
+
126
+ # @return [Candid::Contracts::V3::Types::ContractServiceFacility]
127
+ def create_contract_service_facility(request_options: {}, **params)
128
+ _path_param_names = ["contract_id"]
129
+
130
+ _request = Candid::Internal::JSON::Request.new(
131
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
132
+ method: "POST",
133
+ path: "/api/contracts/v3/#{params[:contract_id]}/service-facilities",
134
+ body: params.except(*_path_param_names)
135
+ )
136
+ begin
137
+ _response = @client.send(_request)
138
+ rescue Net::HTTPRequestTimeout
139
+ raise Candid::Errors::TimeoutError
140
+ end
141
+ code = _response.code.to_i
142
+ if code.between?(200, 299)
143
+ Candid::Contracts::V3::Types::ContractServiceFacility.load(_response.body)
144
+ else
145
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
146
+ raise error_class.new(_response.body, code: code)
147
+ end
148
+ end
149
+
150
+ # @return [Candid::Contracts::V3::Types::ContractServiceFacility]
151
+ def update_contract_service_facility(request_options: {}, **params)
152
+ _path_param_names = %w[contract_id contract_service_facility_id]
153
+
154
+ _request = Candid::Internal::JSON::Request.new(
155
+ base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
156
+ method: "PATCH",
157
+ path: "/api/contracts/v3/#{params[:contract_id]}/service-facilities/#{params[:contract_service_facility_id]}",
158
+ body: params.except(*_path_param_names)
159
+ )
160
+ begin
161
+ _response = @client.send(_request)
162
+ rescue Net::HTTPRequestTimeout
163
+ raise Candid::Errors::TimeoutError
164
+ end
165
+ code = _response.code.to_i
166
+ if code.between?(200, 299)
167
+ Candid::Contracts::V3::Types::ContractServiceFacility.load(_response.body)
168
+ else
169
+ error_class = Candid::Errors::ResponseError.subclass_for_code(code)
170
+ raise error_class.new(_response.body, code: code)
171
+ end
172
+ end
173
+ end
174
+ end
175
+ end
176
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class Contract < Internal::Types::Model
8
+ field :contract_id, -> { String }, optional: false, nullable: false
9
+ field :contracting_provider, lambda {
10
+ Candid::OrganizationProviders::V2::Types::OrganizationProvider
11
+ }, optional: false, nullable: false
12
+ field :provider_count, -> { Integer }, optional: false, nullable: false
13
+ field :payer, -> { Candid::Payers::V3::Types::Payer }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractBase < Internal::Types::Model
8
+ field :effective_date, -> { String }, optional: false, nullable: false
9
+ field :expiration_date, -> { String }, optional: true, nullable: false
10
+ field :regions, -> { Candid::Commons::Types::Regions }, optional: false, nullable: false
11
+ field :contract_status, -> { Candid::Contracts::V2::Types::ContractStatus }, optional: true, nullable: false
12
+ field :authorized_signatory, lambda {
13
+ Candid::Contracts::V2::Types::AuthorizedSignatory
14
+ }, optional: true, nullable: false
15
+ field :commercial_insurance_types, lambda {
16
+ Candid::Contracts::V2::Types::InsuranceTypes
17
+ }, optional: false, nullable: false
18
+ field :medicare_insurance_types, lambda {
19
+ Candid::Contracts::V2::Types::InsuranceTypes
20
+ }, optional: false, nullable: false
21
+ field :medicaid_insurance_types, lambda {
22
+ Candid::Contracts::V2::Types::InsuranceTypes
23
+ }, optional: false, nullable: false
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractCreate < Internal::Types::Model
8
+ field :contract_type, -> { Candid::Contracts::V3::Types::ContractType }, optional: false, nullable: false
9
+ field :contracting_provider_id, -> { String }, optional: false, nullable: false
10
+ field :payer_uuid, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractCreateUnion < Internal::Types::Model
8
+ extend Candid::Internal::Types::Union
9
+
10
+ discriminant :type
11
+
12
+ member -> { Candid::Contracts::V3::Types::ProfessionalContractCreate }, key: "PROFESSIONAL"
13
+ member -> { Candid::Contracts::V3::Types::InstitutionalContractCreate }, key: "INSTITUTIONAL"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractServiceFacility < Internal::Types::Model
8
+ field :contract_id, -> { String }, optional: false, nullable: false
9
+ field :contract_service_facility_id, -> { String }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractServiceFacilityBase < Internal::Types::Model
8
+ field :service_facility_id, -> { String }, optional: false, nullable: false
9
+ field :provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractServiceFacilityCreate < Internal::Types::Model
8
+ field :contract_id, -> { String }, optional: false, nullable: false
9
+ field :service_facility_id, -> { String }, optional: false, nullable: false
10
+ field :provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractServiceFacilityUpdate < Internal::Types::Model
8
+ field :contract_id, -> { String }, optional: false, nullable: false
9
+ field :contract_service_facility_id, -> { String }, optional: false, nullable: false
10
+ field :service_facility_id, -> { String }, optional: true, nullable: false
11
+ field :provider_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ module ContractType
8
+ extend Candid::Internal::Types::Enum
9
+
10
+ PROFESSIONAL = "professional"
11
+ INSTITUTIONAL = "institutional"
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractUnion < Internal::Types::Model
8
+ extend Candid::Internal::Types::Union
9
+
10
+ discriminant :type
11
+
12
+ member -> { Candid::Contracts::V3::Types::Contract }, key: "PROFESSIONAL"
13
+ member -> { Candid::Contracts::V3::Types::Contract }, key: "INSTITUTIONAL"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractUpdate < Internal::Types::Model
8
+ field :effective_date, -> { String }, optional: true, nullable: false
9
+ field :expiration_date, -> { Candid::Contracts::V2::Types::DateUpdate }, optional: true, nullable: false
10
+ field :regions, -> { Candid::Contracts::V2::Types::RegionsUpdate }, optional: true, nullable: false
11
+ field :contract_status, -> { Candid::Contracts::V2::Types::ContractStatus }, optional: true, nullable: false
12
+ field :authorized_signatory, lambda {
13
+ Candid::Contracts::V2::Types::AuthorizedSignatoryUpdate
14
+ }, optional: true, nullable: false
15
+ field :commercial_insurance_types, lambda {
16
+ Candid::Contracts::V2::Types::InsuranceTypes
17
+ }, optional: true, nullable: false
18
+ field :medicare_insurance_types, lambda {
19
+ Candid::Contracts::V2::Types::InsuranceTypes
20
+ }, optional: true, nullable: false
21
+ field :medicaid_insurance_types, lambda {
22
+ Candid::Contracts::V2::Types::InsuranceTypes
23
+ }, optional: true, nullable: false
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractUpdateUnion < Internal::Types::Model
8
+ extend Candid::Internal::Types::Union
9
+
10
+ discriminant :type
11
+
12
+ member -> { Candid::Contracts::V3::Types::ProfessionalContractUpdate }, key: "PROFESSIONAL"
13
+ member -> { Candid::Contracts::V3::Types::InstitutionalContractUpdate }, key: "INSTITUTIONAL"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractWithProvidersUnion < Internal::Types::Model
8
+ extend Candid::Internal::Types::Union
9
+
10
+ discriminant :type
11
+
12
+ member -> { Candid::Contracts::V3::Types::ProfessionalContract }, key: "PROFESSIONAL"
13
+ member -> { Candid::Contracts::V3::Types::InstitutionalContract }, key: "INSTITUTIONAL"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ContractsPage < Internal::Types::Model
8
+ field :items, lambda {
9
+ Internal::Types::Array[Candid::Contracts::V3::Types::ContractUnion]
10
+ }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class GetMultiContractsRequest < Internal::Types::Model
8
+ field :page_token, -> { String }, optional: true, nullable: false
9
+ field :limit, -> { Integer }, optional: true, nullable: false
10
+ field :type, -> { Candid::Contracts::V3::Types::ContractType }, optional: true, nullable: false
11
+ field :contracting_provider_id, -> { String }, optional: true, nullable: false
12
+ field :rendering_provider_ids, -> { String }, optional: true, nullable: false
13
+ field :payer_names, -> { String }, optional: true, nullable: false
14
+ field :states, -> { Candid::Commons::Types::State }, optional: true, nullable: false
15
+ field :contract_status, -> { Candid::Contracts::V2::Types::ContractStatus }, optional: true, nullable: false
16
+ field :sort, -> { Candid::Contracts::V2::Types::ContractSortField }, optional: true, nullable: false
17
+ field :sort_direction, -> { Candid::Commons::Types::SortDirection }, optional: true, nullable: false
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class InstitutionalContract < Internal::Types::Model
8
+ field :contract_service_facilities, lambda {
9
+ Internal::Types::Array[Candid::Contracts::V3::Types::ContractServiceFacility]
10
+ }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class InstitutionalContractCreate < Internal::Types::Model
8
+ field :contract_service_facilities, lambda {
9
+ Internal::Types::Array[Candid::Contracts::V3::Types::ContractServiceFacilityBase]
10
+ }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class InstitutionalContractUpdate < Internal::Types::Model
8
+ field :contract_service_facility_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ProfessionalContract < Internal::Types::Model
8
+ field :rendering_provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ProfessionalContractCreate < Internal::Types::Model
8
+ field :rendering_provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Candid
4
+ module Contracts
5
+ module V3
6
+ module Types
7
+ class ProfessionalContractUpdate < Internal::Types::Model
8
+ field :rendering_provider_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Candid
4
- VERSION = "1.16.0"
4
+ VERSION = "1.17.0"
5
5
  end
data/lib/candid.rb CHANGED
@@ -160,6 +160,24 @@ require_relative "candid/contracts/v_2/types/contract"
160
160
  require_relative "candid/contracts/v_2/types/contract_with_providers"
161
161
  require_relative "candid/contracts/v_2/types/contracts_page"
162
162
  require_relative "candid/contracts/v_2/types/contract_sort_field"
163
+ require_relative "candid/contracts/v_3/types/contract_type"
164
+ require_relative "candid/contracts/v_3/types/contract_service_facility_base"
165
+ require_relative "candid/contracts/v_3/types/contract_service_facility"
166
+ require_relative "candid/contracts/v_3/types/contract_base"
167
+ require_relative "candid/contracts/v_3/types/contract"
168
+ require_relative "candid/contracts/v_3/types/professional_contract"
169
+ require_relative "candid/contracts/v_3/types/institutional_contract"
170
+ require_relative "candid/contracts/v_3/types/contract_union"
171
+ require_relative "candid/contracts/v_3/types/contract_with_providers_union"
172
+ require_relative "candid/contracts/v_3/types/contract_create"
173
+ require_relative "candid/contracts/v_3/types/professional_contract_create"
174
+ require_relative "candid/contracts/v_3/types/institutional_contract_create"
175
+ require_relative "candid/contracts/v_3/types/contract_create_union"
176
+ require_relative "candid/contracts/v_3/types/contract_update"
177
+ require_relative "candid/contracts/v_3/types/professional_contract_update"
178
+ require_relative "candid/contracts/v_3/types/institutional_contract_update"
179
+ require_relative "candid/contracts/v_3/types/contract_update_union"
180
+ require_relative "candid/contracts/v_3/types/contracts_page"
163
181
  require_relative "candid/credentialing/v_2/types/credentialing_span_status"
164
182
  require_relative "candid/commons/types/date_range_optional_end"
165
183
  require_relative "candid/identifiers/types/identifier_code"
@@ -744,6 +762,10 @@ require_relative "candid/contracts/v_2/client"
744
762
  require_relative "candid/contracts/v_2/types/get_multi_contracts_request"
745
763
  require_relative "candid/contracts/v_2/types/contract_create"
746
764
  require_relative "candid/contracts/v_2/types/contract_update"
765
+ require_relative "candid/contracts/v_3/client"
766
+ require_relative "candid/contracts/v_3/types/get_multi_contracts_request"
767
+ require_relative "candid/contracts/v_3/types/contract_service_facility_create"
768
+ require_relative "candid/contracts/v_3/types/contract_service_facility_update"
747
769
  require_relative "candid/credentialing/client"
748
770
  require_relative "candid/credentialing/v_2/client"
749
771
  require_relative "candid/credentialing/v_2/types/facility_credentialing_span_create"
data/reference.md CHANGED
@@ -1442,6 +1442,20 @@ If false, the change will be marked as unresolved.
1442
1442
  <dl>
1443
1443
  <dd>
1444
1444
 
1445
+ #### 📝 Description
1446
+
1447
+ <dl>
1448
+ <dd>
1449
+
1450
+ <dl>
1451
+ <dd>
1452
+
1453
+ This API provides access to Professional Contracts. For Professional and Institutional Contracts use Contracts V3.
1454
+ </dd>
1455
+ </dl>
1456
+ </dd>
1457
+ </dl>
1458
+
1445
1459
  #### 🔌 Usage
1446
1460
 
1447
1461
  <dl>
@@ -1482,6 +1496,20 @@ client.contracts.v_2.get();
1482
1496
  <dl>
1483
1497
  <dd>
1484
1498
 
1499
+ #### 📝 Description
1500
+
1501
+ <dl>
1502
+ <dd>
1503
+
1504
+ <dl>
1505
+ <dd>
1506
+
1507
+ This API provides access to Professional Contracts. For Professional and Institutional Contracts use Contracts V3.
1508
+ </dd>
1509
+ </dl>
1510
+ </dd>
1511
+ </dl>
1512
+
1485
1513
  #### 🔌 Usage
1486
1514
 
1487
1515
  <dl>
@@ -1820,6 +1848,412 @@ value, overriding what was set before.
1820
1848
  </dl>
1821
1849
 
1822
1850
 
1851
+ </dd>
1852
+ </dl>
1853
+ </details>
1854
+
1855
+ ## Contracts V3
1856
+ <details><summary><code>client.contracts.v_3.get(contract_id) -> Candid::Contracts::V3::Types::ContractWithProvidersUnion</code></summary>
1857
+ <dl>
1858
+ <dd>
1859
+
1860
+ #### 🔌 Usage
1861
+
1862
+ <dl>
1863
+ <dd>
1864
+
1865
+ <dl>
1866
+ <dd>
1867
+
1868
+ ```ruby
1869
+ client.contracts.v_3.get();
1870
+ ```
1871
+ </dd>
1872
+ </dl>
1873
+ </dd>
1874
+ </dl>
1875
+
1876
+ #### ⚙️ Parameters
1877
+
1878
+ <dl>
1879
+ <dd>
1880
+
1881
+ <dl>
1882
+ <dd>
1883
+
1884
+ **contract_id:** `String`
1885
+
1886
+ </dd>
1887
+ </dl>
1888
+ </dd>
1889
+ </dl>
1890
+
1891
+
1892
+ </dd>
1893
+ </dl>
1894
+ </details>
1895
+
1896
+ <details><summary><code>client.contracts.v_3.get_multi() -> Candid::Contracts::V3::Types::ContractsPage</code></summary>
1897
+ <dl>
1898
+ <dd>
1899
+
1900
+ #### 🔌 Usage
1901
+
1902
+ <dl>
1903
+ <dd>
1904
+
1905
+ <dl>
1906
+ <dd>
1907
+
1908
+ ```ruby
1909
+ client.contracts.v_3.get_multi();
1910
+ ```
1911
+ </dd>
1912
+ </dl>
1913
+ </dd>
1914
+ </dl>
1915
+
1916
+ #### ⚙️ Parameters
1917
+
1918
+ <dl>
1919
+ <dd>
1920
+
1921
+ <dl>
1922
+ <dd>
1923
+
1924
+ **page_token:** `String`
1925
+
1926
+ </dd>
1927
+ </dl>
1928
+
1929
+ <dl>
1930
+ <dd>
1931
+
1932
+ **limit:** `Integer` — Max number of contracts returned. Defaults to 1000. Max is 1000.
1933
+
1934
+ </dd>
1935
+ </dl>
1936
+
1937
+ <dl>
1938
+ <dd>
1939
+
1940
+ **type:** `Candid::Contracts::V3::Types::ContractType` — The type of contract
1941
+
1942
+ </dd>
1943
+ </dl>
1944
+
1945
+ <dl>
1946
+ <dd>
1947
+
1948
+ **contracting_provider_id:** `String`
1949
+
1950
+ </dd>
1951
+ </dl>
1952
+
1953
+ <dl>
1954
+ <dd>
1955
+
1956
+ **rendering_provider_ids:** `String`
1957
+
1958
+ </dd>
1959
+ </dl>
1960
+
1961
+ <dl>
1962
+ <dd>
1963
+
1964
+ **payer_names:** `String` — Filter to contracts that include any of the included payer names.
1965
+
1966
+ </dd>
1967
+ </dl>
1968
+
1969
+ <dl>
1970
+ <dd>
1971
+
1972
+ **states:** `Candid::Commons::Types::State`
1973
+
1974
+ </dd>
1975
+ </dl>
1976
+
1977
+ <dl>
1978
+ <dd>
1979
+
1980
+ **contract_status:** `Candid::Contracts::V2::Types::ContractStatus` — The status of the contract. Defaults to `pending`
1981
+
1982
+ </dd>
1983
+ </dl>
1984
+
1985
+ <dl>
1986
+ <dd>
1987
+
1988
+ **sort:** `Candid::Contracts::V2::Types::ContractSortField` — Potentially sort by a contract related attribute. Defaults to created_at
1989
+
1990
+ </dd>
1991
+ </dl>
1992
+
1993
+ <dl>
1994
+ <dd>
1995
+
1996
+ **sort_direction:** `Candid::Commons::Types::SortDirection` — Direction of sort, defaulting to desc
1997
+
1998
+ </dd>
1999
+ </dl>
2000
+ </dd>
2001
+ </dl>
2002
+
2003
+
2004
+ </dd>
2005
+ </dl>
2006
+ </details>
2007
+
2008
+ <details><summary><code>client.contracts.v_3.create(request) -> Candid::Contracts::V3::Types::ContractWithProvidersUnion</code></summary>
2009
+ <dl>
2010
+ <dd>
2011
+
2012
+ #### 📝 Description
2013
+
2014
+ <dl>
2015
+ <dd>
2016
+
2017
+ <dl>
2018
+ <dd>
2019
+
2020
+ Creates a new contract within the user's current organization
2021
+ </dd>
2022
+ </dl>
2023
+ </dd>
2024
+ </dl>
2025
+
2026
+ #### 🔌 Usage
2027
+
2028
+ <dl>
2029
+ <dd>
2030
+
2031
+ <dl>
2032
+ <dd>
2033
+
2034
+ ```ruby
2035
+ client.contracts.v_3.create();
2036
+ ```
2037
+ </dd>
2038
+ </dl>
2039
+ </dd>
2040
+ </dl>
2041
+
2042
+ #### ⚙️ Parameters
2043
+
2044
+ <dl>
2045
+ <dd>
2046
+
2047
+ <dl>
2048
+ <dd>
2049
+
2050
+ **request:** `Candid::Contracts::V3::Types::ContractCreateUnion`
2051
+
2052
+ </dd>
2053
+ </dl>
2054
+ </dd>
2055
+ </dl>
2056
+
2057
+
2058
+ </dd>
2059
+ </dl>
2060
+ </details>
2061
+
2062
+ <details><summary><code>client.contracts.v_3.delete(contract_id) -> </code></summary>
2063
+ <dl>
2064
+ <dd>
2065
+
2066
+ #### 🔌 Usage
2067
+
2068
+ <dl>
2069
+ <dd>
2070
+
2071
+ <dl>
2072
+ <dd>
2073
+
2074
+ ```ruby
2075
+ client.contracts.v_3.delete();
2076
+ ```
2077
+ </dd>
2078
+ </dl>
2079
+ </dd>
2080
+ </dl>
2081
+
2082
+ #### ⚙️ Parameters
2083
+
2084
+ <dl>
2085
+ <dd>
2086
+
2087
+ <dl>
2088
+ <dd>
2089
+
2090
+ **contract_id:** `String`
2091
+
2092
+ </dd>
2093
+ </dl>
2094
+ </dd>
2095
+ </dl>
2096
+
2097
+
2098
+ </dd>
2099
+ </dl>
2100
+ </details>
2101
+
2102
+ <details><summary><code>client.contracts.v_3.update(contract_id, request) -> Candid::Contracts::V3::Types::ContractWithProvidersUnion</code></summary>
2103
+ <dl>
2104
+ <dd>
2105
+
2106
+ #### 🔌 Usage
2107
+
2108
+ <dl>
2109
+ <dd>
2110
+
2111
+ <dl>
2112
+ <dd>
2113
+
2114
+ ```ruby
2115
+ client.contracts.v_3.update();
2116
+ ```
2117
+ </dd>
2118
+ </dl>
2119
+ </dd>
2120
+ </dl>
2121
+
2122
+ #### ⚙️ Parameters
2123
+
2124
+ <dl>
2125
+ <dd>
2126
+
2127
+ <dl>
2128
+ <dd>
2129
+
2130
+ **contract_id:** `String`
2131
+
2132
+ </dd>
2133
+ </dl>
2134
+
2135
+ <dl>
2136
+ <dd>
2137
+
2138
+ **request:** `Candid::Contracts::V3::Types::ContractUpdateUnion`
2139
+
2140
+ </dd>
2141
+ </dl>
2142
+ </dd>
2143
+ </dl>
2144
+
2145
+
2146
+ </dd>
2147
+ </dl>
2148
+ </details>
2149
+
2150
+ <details><summary><code>client.contracts.v_3.create_contract_service_facility(contract_id, request) -> Candid::Contracts::V3::Types::ContractServiceFacility</code></summary>
2151
+ <dl>
2152
+ <dd>
2153
+
2154
+ #### 🔌 Usage
2155
+
2156
+ <dl>
2157
+ <dd>
2158
+
2159
+ <dl>
2160
+ <dd>
2161
+
2162
+ ```ruby
2163
+ client.contracts.v_3.create_contract_service_facility(
2164
+ contractId: 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32',
2165
+ serviceFacilityId: 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32',
2166
+ providerIds: Set.new(['d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32'])
2167
+ );
2168
+ ```
2169
+ </dd>
2170
+ </dl>
2171
+ </dd>
2172
+ </dl>
2173
+
2174
+ #### ⚙️ Parameters
2175
+
2176
+ <dl>
2177
+ <dd>
2178
+
2179
+ <dl>
2180
+ <dd>
2181
+
2182
+ **contract_id:** `String`
2183
+
2184
+ </dd>
2185
+ </dl>
2186
+ </dd>
2187
+ </dl>
2188
+
2189
+
2190
+ </dd>
2191
+ </dl>
2192
+ </details>
2193
+
2194
+ <details><summary><code>client.contracts.v_3.update_contract_service_facility(contract_id, contract_service_facility_id, request) -> Candid::Contracts::V3::Types::ContractServiceFacility</code></summary>
2195
+ <dl>
2196
+ <dd>
2197
+
2198
+ #### 🔌 Usage
2199
+
2200
+ <dl>
2201
+ <dd>
2202
+
2203
+ <dl>
2204
+ <dd>
2205
+
2206
+ ```ruby
2207
+ client.contracts.v_3.update_contract_service_facility(
2208
+ contractId: 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32',
2209
+ contractServiceFacilityId: 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32'
2210
+ );
2211
+ ```
2212
+ </dd>
2213
+ </dl>
2214
+ </dd>
2215
+ </dl>
2216
+
2217
+ #### ⚙️ Parameters
2218
+
2219
+ <dl>
2220
+ <dd>
2221
+
2222
+ <dl>
2223
+ <dd>
2224
+
2225
+ **contract_id:** `String`
2226
+
2227
+ </dd>
2228
+ </dl>
2229
+
2230
+ <dl>
2231
+ <dd>
2232
+
2233
+ **contract_service_facility_id:** `String`
2234
+
2235
+ </dd>
2236
+ </dl>
2237
+
2238
+ <dl>
2239
+ <dd>
2240
+
2241
+ **service_facility_id:** `String` — The UUID of the service facility
2242
+
2243
+ </dd>
2244
+ </dl>
2245
+
2246
+ <dl>
2247
+ <dd>
2248
+
2249
+ **provider_ids:** `Internal::Types::Array[String]` — The providers who are authorized under the contract
2250
+
2251
+ </dd>
2252
+ </dl>
2253
+ </dd>
2254
+ </dl>
2255
+
2256
+
1823
2257
  </dd>
1824
2258
  </dl>
1825
2259
  </details>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candidhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Candid
@@ -133,6 +133,28 @@ files:
133
133
  - lib/candid/contracts/v_2/types/get_multi_contracts_request.rb
134
134
  - lib/candid/contracts/v_2/types/insurance_types.rb
135
135
  - lib/candid/contracts/v_2/types/regions_update.rb
136
+ - lib/candid/contracts/v_3/client.rb
137
+ - lib/candid/contracts/v_3/types/contract.rb
138
+ - lib/candid/contracts/v_3/types/contract_base.rb
139
+ - lib/candid/contracts/v_3/types/contract_create.rb
140
+ - lib/candid/contracts/v_3/types/contract_create_union.rb
141
+ - lib/candid/contracts/v_3/types/contract_service_facility.rb
142
+ - lib/candid/contracts/v_3/types/contract_service_facility_base.rb
143
+ - lib/candid/contracts/v_3/types/contract_service_facility_create.rb
144
+ - lib/candid/contracts/v_3/types/contract_service_facility_update.rb
145
+ - lib/candid/contracts/v_3/types/contract_type.rb
146
+ - lib/candid/contracts/v_3/types/contract_union.rb
147
+ - lib/candid/contracts/v_3/types/contract_update.rb
148
+ - lib/candid/contracts/v_3/types/contract_update_union.rb
149
+ - lib/candid/contracts/v_3/types/contract_with_providers_union.rb
150
+ - lib/candid/contracts/v_3/types/contracts_page.rb
151
+ - lib/candid/contracts/v_3/types/get_multi_contracts_request.rb
152
+ - lib/candid/contracts/v_3/types/institutional_contract.rb
153
+ - lib/candid/contracts/v_3/types/institutional_contract_create.rb
154
+ - lib/candid/contracts/v_3/types/institutional_contract_update.rb
155
+ - lib/candid/contracts/v_3/types/professional_contract.rb
156
+ - lib/candid/contracts/v_3/types/professional_contract_create.rb
157
+ - lib/candid/contracts/v_3/types/professional_contract_update.rb
136
158
  - lib/candid/credentialing/client.rb
137
159
  - lib/candid/credentialing/v_2/client.rb
138
160
  - lib/candid/credentialing/v_2/types/base_credentialing_span.rb