Class: Courier::Resources::Automations

Inherits:
Object
  • Object
show all
Defined in:
lib/courier/resources/automations.rb,
lib/courier/resources/automations/invoke.rb

Defined Under Namespace

Classes: Invoke

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:



40
41
42
43
# File 'lib/courier/resources/automations.rb', line 40

def initialize(client:)
  @client = client
  @invoke = Courier::Resources::Automations::Invoke.new(client: client)
end

Instance Attribute Details

#invokeCourier::Resources::Automations::Invoke (readonly)



7
8
9
# File 'lib/courier/resources/automations.rb', line 7

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.

Get the list of automations.

Parameters:

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/courier/resources/automations.rb', line 25

def list(params = {})
  parsed, options = 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: options
  )
end