Class: PersonaApi::ApiLogsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/persona_api/resources/api_logs.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#delete_request, #get_request, #handle_response, #initialize, #patch_request, #post_request, #put_request

Constructor Details

This class inherits a constructor from PersonaApi::Resource

Instance Method Details

#list(**params) ⇒ Object



3
4
5
# File 'lib/persona_api/resources/api_logs.rb', line 3

def list(**params)
  Collection.from_response get_request("api-logs", params: params), key: "data", type: ApiLog
end

#retrieve(req_id:) ⇒ Object



7
8
9
# File 'lib/persona_api/resources/api_logs.rb', line 7

def retrieve(req_id:)
  ApiLog.new get_request("api-logs/#{req_id}").body.dig("data")
end