Class: Zavudev::Resources::Senders::Agent::Executions
- Inherits:
-
Object
- Object
- Zavudev::Resources::Senders::Agent::Executions
- Defined in:
- lib/zavudev/resources/senders/agent/executions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Executions
constructor
private
A new instance of Executions.
-
#list(sender_id, cursor: nil, limit: nil, status: nil, request_options: {}) ⇒ Zavudev::Internal::Cursor<Zavudev::Models::Senders::AgentExecution>
List recent agent executions with pagination.
-
#retrieve(execution_id, sender_id:, request_options: {}) ⇒ Zavudev::Models::Senders::Agent::ExecutionRetrieveResponse
Fetch full details for one execution — including ‘errorMessage`, `errorCode`, and `responseText`.
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.
67 68 69 |
# File 'lib/zavudev/resources/senders/agent/executions.rb', line 67 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.
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/zavudev/resources/senders/agent/executions.rb', line 51 def list(sender_id, params = {}) parsed, = 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: ) end |
#retrieve(execution_id, sender_id:, request_options: {}) ⇒ Zavudev::Models::Senders::Agent::ExecutionRetrieveResponse
Fetch full details for one execution — including ‘errorMessage`, `errorCode`, and `responseText`. Use this to debug failures surfaced by the list endpoint.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/zavudev/resources/senders/agent/executions.rb', line 20 def retrieve(execution_id, params) parsed, = Zavudev::Senders::Agent::ExecutionRetrieveParams.dump_request(params) sender_id = parsed.delete(:sender_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["v1/senders/%1$s/agent/executions/%2$s", sender_id, execution_id], model: Zavudev::Models::Senders::Agent::ExecutionRetrieveResponse, options: ) end |