Class: Zavudev::Resources::Senders::Agent::Executions

Inherits:
Object
  • Object
show all
Defined in:
lib/zavudev/resources/senders/agent/executions.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Executions

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 Executions.

Parameters:



41
42
43
# File 'lib/zavudev/resources/senders/agent/executions.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#list(sender_id, cursor: nil, limit: nil, status: nil, request_options: {}) ⇒ Zavudev::Internal::Cursor<Zavudev::Models::Senders::AgentExecution>

List recent agent executions with pagination.

Parameters:

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/zavudev/resources/senders/agent/executions.rb', line 25

def list(sender_id, params = {})
  parsed, options = Zavudev::Senders::Agent::ExecutionListParams.dump_request(params)
  query = Zavudev::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/senders/%1$s/agent/executions", sender_id],
    query: query,
    page: Zavudev::Internal::Cursor,
    model: Zavudev::Senders::AgentExecution,
    options: options
  )
end