Class: CandidApiClient::OrganizationServiceFacilities::V2::AsyncV2Client
- Inherits:
-
Object
- Object
- CandidApiClient::OrganizationServiceFacilities::V2::AsyncV2Client
- Defined in:
- lib/candidhealth/organization_service_facilities/v_2/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
- #delete(organization_service_facility_id:, request_options: nil) ⇒ Void
- #get(organization_service_facility_id:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
- #get_multi(limit: nil, name: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage
- #initialize(request_client:) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::AsyncV2Client constructor
- #update(organization_service_facility_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::AsyncV2Client
183 184 185 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 183 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
179 180 181 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 179 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 268 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-service-facilities/v2" end CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility.from_json(json_object: response.body) end end |
#delete(organization_service_facility_id:, request_options: nil) ⇒ Void
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 334 def delete(organization_service_facility_id:, request_options: nil) Async do @request_client.conn.delete 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-service-facilities/v2/#{organization_service_facility_id}" end end end |
#get(organization_service_facility_id:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 193 def get(organization_service_facility_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-service-facilities/v2/#{organization_service_facility_id}" end CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility.from_json(json_object: response.body) end end |
#get_multi(limit: nil, name: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 222 def get_multi(limit: nil, name: nil, page_token: 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, "name": name, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/organization-service-facilities/v2" end CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage.from_json(json_object: response.body) end end |
#update(organization_service_facility_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 310 def update(organization_service_facility_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-service-facilities/v2/#{organization_service_facility_id}" end CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility.from_json(json_object: response.body) end end |