52
53
54
55
56
57
58
59
60
61
62
63
64
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/vapi_server_sdk/logs/client.rb', line 52
def get(org_id: nil, 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)
response = @request_client.conn.get do |req|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
req.["Authorization"] = request_options.token unless request_options&.token.nil?
req. = {
**(req. || {}),
**@request_client.,
**(request_options&. || {})
}.compact
req.params = {
**(request_options&.additional_query_parameters || {}),
"orgId": org_id,
"type": 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 request_options.nil? || request_options&.additional_body_parameters.nil?
req.body = { **(request_options&.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
|