Class: CandidApiClient::NonInsurancePayers::V1::V1Client
- Inherits:
-
Object
- Object
- CandidApiClient::NonInsurancePayers::V1::V1Client
- Defined in:
- lib/candidhealth/non_insurance_payers/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
- #delete(non_insurance_payer_id:, request_options: nil) ⇒ Void
- #get(non_insurance_payer_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
- #get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerPage
- #initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayers::V1::V1Client constructor
- #toggle_enablement(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
- #update(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayers::V1::V1Client
22 23 24 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 22 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
18 19 20 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 18 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 42 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/non-insurance-payers/v1" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end |
#delete(non_insurance_payer_id:, request_options: nil) ⇒ Void
182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 182 def delete(non_insurance_payer_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/non-insurance-payers/v1/#{non_insurance_payer_id}" end end |
#get(non_insurance_payer_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 134 def get(non_insurance_payer_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/non-insurance-payers/v1/#{non_insurance_payer_id}" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end |
#get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerPage
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 102 def get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: 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 || {}), "name": name, "category": category, "enabled": enabled, "sort": sort, "sort_direction": sort_direction, "limit": limit, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerPage.from_json(json_object: response.body) end |
#toggle_enablement(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 66 def toggle_enablement(non_insurance_payer_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/non-insurance-payers/v1/#{non_insurance_payer_id}/toggle_enablement" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end |
#update(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 160 def update(non_insurance_payer_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/non-insurance-payers/v1/#{non_insurance_payer_id}" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end |