Class: Trycourier::Resources::AuditEvents
- Inherits:
-
Object
- Object
- Trycourier::Resources::AuditEvents
- Defined in:
- lib/trycourier/resources/audit_events.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ AuditEvents
constructor
private
A new instance of AuditEvents.
-
#list(cursor: nil, request_options: {}) ⇒ Trycourier::Models::AuditEventListResponse
Fetch the list of audit events.
-
#retrieve(audit_event_id, request_options: {}) ⇒ Trycourier::Models::AuditEvent
Fetch a specific audit event by ID.
Constructor Details
#initialize(client:) ⇒ AuditEvents
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AuditEvents.
51 52 53 |
# File 'lib/trycourier/resources/audit_events.rb', line 51 def initialize(client:) @client = client end |
Instance Method Details
#list(cursor: nil, request_options: {}) ⇒ Trycourier::Models::AuditEventListResponse
Fetch the list of audit events
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/trycourier/resources/audit_events.rb', line 37 def list(params = {}) parsed, = Trycourier::AuditEventListParams.dump_request(params) @client.request( method: :get, path: "audit-events", query: parsed, model: Trycourier::Models::AuditEventListResponse, options: ) end |
#retrieve(audit_event_id, request_options: {}) ⇒ Trycourier::Models::AuditEvent
Fetch a specific audit event by ID.
17 18 19 20 21 22 23 24 |
# File 'lib/trycourier/resources/audit_events.rb', line 17 def retrieve(audit_event_id, params = {}) @client.request( method: :get, path: ["audit-events/%1$s", audit_event_id], model: Trycourier::AuditEvent, options: params[:request_options] ) end |