Class: CandidApiClient::OrganizationProviders::V3::AsyncV3Client
- Inherits:
-
Object
- Object
- CandidApiClient::OrganizationProviders::V3::AsyncV3Client
- Defined in:
- lib/candidhealth/organization_providers/v_3/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
- #get(organization_provider_id:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
- #get_multi(limit: nil, search_term: nil, npi: nil, is_rendering: nil, is_billing: nil, page_token: nil, sort: nil, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderPageV2
- #initialize(request_client:) ⇒ CandidApiClient::OrganizationProviders::V3::AsyncV3Client constructor
- #update(organization_provider_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::OrganizationProviders::V3::AsyncV3Client
171 172 173 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 171 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
167 168 169 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 167 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 266 def create(request:, request_options: nil) Async do response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/organization-providers/v3" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: response.body) end end |
#get(organization_provider_id:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 181 def get(organization_provider_id:, request_options: nil) Async do response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/organization-providers/v3/#{organization_provider_id}" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: response.body) end end |
#get_multi(limit: nil, search_term: nil, npi: nil, is_rendering: nil, is_billing: nil, page_token: nil, sort: nil, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderPageV2
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 218 def get_multi(limit: nil, search_term: nil, npi: nil, is_rendering: nil, is_billing: nil, page_token: nil, sort: nil, request_options: nil) Async do response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "limit": limit, "search_term": search_term, "npi": npi, "is_rendering": is_rendering, "is_billing": is_billing, "page_token": page_token, "sort": sort }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/organization-providers/v3" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderPageV2.from_json(json_object: response.body) end end |
#update(organization_provider_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 305 def update(organization_provider_id:, request:, request_options: nil) Async do response = @request_client.conn.patch do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/organization-providers/v3/#{organization_provider_id}" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: response.body) end end |