Class: CandidApiClient::OrganizationServiceFacilities::V2::V2Client
- Inherits:
-
Object
- Object
- CandidApiClient::OrganizationServiceFacilities::V2::V2Client
- 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::V2Client constructor
- #update(organization_service_facility_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::V2Client
19 20 21 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 19 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
15 16 17 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 15 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 100 def create(request:, request_options: nil) 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 |
#delete(organization_service_facility_id:, request_options: nil) ⇒ Void
162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 162 def delete(organization_service_facility_id:, request_options: nil) @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 |
#get(organization_service_facility_id:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 29 def get(organization_service_facility_id:, request_options: nil) 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 |
#get_multi(limit: nil, name: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacilityPage
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 56 def get_multi(limit: nil, name: nil, page_token: nil, request_options: nil) 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 |
#update(organization_service_facility_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationServiceFacilities::V2::Types::OrganizationServiceFacility
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/candidhealth/organization_service_facilities/v_2/client.rb', line 140 def update(organization_service_facility_id:, request:, request_options: nil) 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 |