Class: Rafflesia::Audit

Inherits:
Object
  • Object
show all
Defined in:
lib/rafflesia/audit.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Audit

Returns a new instance of Audit.



9
10
11
# File 'lib/rafflesia/audit.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#logsList(operation: nil, path: nil, status: nil, before: nil, limit: nil, request_options: {}) ⇒ Rafflesia::EnvelopeAuditLogListData

GET /v1/audit/logs

Parameters:

  • operation (String, nil) (defaults to: nil)
  • path (String, nil) (defaults to: nil)
  • status (Rafflesia::Types::AuditStatus, nil) (defaults to: nil)
  • before (String, nil) (defaults to: nil)
  • limit (Integer, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/rafflesia/audit.rb', line 21

def logsList(
  operation: nil,
  path: nil,
  status: nil,
  before: nil,
  limit: nil,
  request_options: {}
)
  params = {
    'operation' => operation,
    'path' => path,
    'status' => status,
    'before' => before,
    'limit' => limit
  }.compact
  response = @client.request(
    method: :get,
    path: '/v1/audit/logs',
    auth: true,
    params: params,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeAuditLogListData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end