Class: Vapi::AsyncLogsClient
- Inherits:
-
Object
- Object
- Vapi::AsyncLogsClient
- Defined in:
- lib/vapi_server_sdk/logs/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #get(type: nil, webhook_type: nil, assistant_id: nil, phone_number_id: nil, customer_id: nil, squad_id: nil, call_id: nil, page: nil, sort_order: nil, limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil, updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: nil, request_options: nil) ⇒ Vapi::LogsPaginatedResponse
- #initialize(request_client:) ⇒ Vapi::AsyncLogsClient constructor
- #logging_controller_logs_delete_query(type: nil, assistant_id: nil, phone_number_id: nil, customer_id: nil, squad_id: nil, call_id: nil, request_options: nil) ⇒ Void
Constructor Details
#initialize(request_client:) ⇒ Vapi::AsyncLogsClient
126 127 128 |
# File 'lib/vapi_server_sdk/logs/client.rb', line 126 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ Vapi::AsyncRequestClient (readonly)
122 123 124 |
# File 'lib/vapi_server_sdk/logs/client.rb', line 122 def request_client @request_client end |
Instance Method Details
#get(type: nil, webhook_type: nil, assistant_id: nil, phone_number_id: nil, customer_id: nil, squad_id: nil, call_id: nil, page: nil, sort_order: nil, limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil, updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: nil, request_options: nil) ⇒ Vapi::LogsPaginatedResponse
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/vapi_server_sdk/logs/client.rb', line 154 def get(type: nil, webhook_type: nil, assistant_id: nil, phone_number_id: nil, customer_id: nil, squad_id: nil, call_id: nil, page: nil, sort_order: nil, limit: nil, created_at_gt: nil, created_at_lt: nil, created_at_ge: nil, created_at_le: nil, updated_at_gt: nil, updated_at_lt: nil, updated_at_ge: nil, updated_at_le: 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 || {}), "type": type, "webhookType": webhook_type, "assistantId": assistant_id, "phoneNumberId": phone_number_id, "customerId": customer_id, "squadId": squad_id, "callId": call_id, "page": page, "sortOrder": sort_order, "limit": limit, "createdAtGt": created_at_gt, "createdAtLt": created_at_lt, "createdAtGe": created_at_ge, "createdAtLe": created_at_le, "updatedAtGt": updated_at_gt, "updatedAtLt": updated_at_lt, "updatedAtGe": updated_at_ge, "updatedAtLe": updated_at_le }.compact unless .nil? || &.additional_body_parameters.nil? req.body = { **(&.additional_body_parameters || {}) }.compact end req.url "#{@request_client.get_url(request_options: request_options)}/logs" end Vapi::LogsPaginatedResponse.from_json(json_object: response.body) end end |
#logging_controller_logs_delete_query(type: nil, assistant_id: nil, phone_number_id: nil, customer_id: nil, squad_id: nil, call_id: nil, request_options: nil) ⇒ Void
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/vapi_server_sdk/logs/client.rb', line 203 def logging_controller_logs_delete_query(type: nil, assistant_id: nil, phone_number_id: nil, customer_id: nil, squad_id: nil, call_id: nil, 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.params = { **(&.additional_query_parameters || {}), "type": type, "assistantId": assistant_id, "phoneNumberId": phone_number_id, "customerId": customer_id, "squadId": squad_id, "callId": call_id }.compact unless .nil? || &.additional_body_parameters.nil? req.body = { **(&.additional_body_parameters || {}) }.compact end req.url "#{@request_client.get_url(request_options: request_options)}/logs" end end end |