Class: CandidApiClient::OrganizationProviders::V3::V3Client
- Inherits:
-
Object
- Object
- CandidApiClient::OrganizationProviders::V3::V3Client
- 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::V3Client constructor
- #update(organization_provider_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::OrganizationProviders::V3::V3Client
20 21 22 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 20 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
16 17 18 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 16 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 111 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-providers/v3" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: response.body) end |
#get(organization_provider_id:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 30 def get(organization_provider_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-providers/v3/#{organization_provider_id}" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: response.body) 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
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 65 def get_multi(limit: nil, search_term: nil, npi: nil, is_rendering: nil, is_billing: nil, page_token: nil, sort: 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, "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 |
#update(organization_provider_id:, request:, request_options: nil) ⇒ CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/candidhealth/organization_providers/v_3/client.rb', line 148 def update(organization_provider_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-providers/v3/#{organization_provider_id}" end CandidApiClient::OrganizationProviders::V3::Types::OrganizationProviderV2.from_json(json_object: response.body) end |