Class: Courier::Resources::Automations
- Inherits:
-
Object
- Object
- Courier::Resources::Automations
- Defined in:
- lib/courier/resources/automations.rb,
lib/courier/resources/automations/invoke.rb,
sig/courier/resources/automations.rbs,
sig/courier/resources/automations/invoke.rbs
Overview
Invoke a stored automation template or an ad hoc automation defined in the request.
Defined Under Namespace
Classes: Invoke
Instance Attribute Summary collapse
-
#invoke ⇒ Courier::Resources::Automations::Invoke
readonly
Invoke a stored automation template or an ad hoc automation defined in the request.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Automations
constructor
private
A new instance of Automations.
-
#list(cursor: nil, version: nil, request_options: {}) ⇒ Courier::Models::AutomationTemplateListResponse
Some parameter documentations has been truncated, see Models::AutomationListParams for more details.
Constructor Details
#initialize(client:) ⇒ Automations
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 Automations.
45 46 47 48 |
# File 'lib/courier/resources/automations.rb', line 45 def initialize(client:) @client = client @invoke = Courier::Resources::Automations::Invoke.new(client: client) end |
Instance Attribute Details
#invoke ⇒ Courier::Resources::Automations::Invoke (readonly)
Invoke a stored automation template or an ad hoc automation defined in the request.
11 12 13 |
# File 'lib/courier/resources/automations.rb', line 11 def invoke @invoke end |
Instance Method Details
#list(cursor: nil, version: nil, request_options: {}) ⇒ Courier::Models::AutomationTemplateListResponse
Some parameter documentations has been truncated, see Models::AutomationListParams for more details.
Lists the workspace's saved automation templates, each with its id and a cursor for paging to the next page of results.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/courier/resources/automations.rb', line 30 def list(params = {}) parsed, = Courier::AutomationListParams.dump_request(params) query = Courier::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "automations", query: query, model: Courier::AutomationTemplateListResponse, options: ) end |