Module: Drip::Client::WorkflowTriggers

Included in:
Drip::Client
Defined in:
lib/drip/client/workflow_triggers.rb

Instance Method Summary collapse

Instance Method Details

#create_workflow_trigger(id, options = {}) ⇒ Object

Public: Create a workflow trigger. id - Required. The String id of the workflow

options - A Hash of options.

- provider      - Required. Required. A String indicating a provider.
- trigger_type  - Required. A String indicating the automation
                  trigger type.
- properties    - Optional. An Object containing properties for the given trigger.

Returns a Drip::Response. See www.getdrip.com/docs/rest-api#workflows



24
25
26
# File 'lib/drip/client/workflow_triggers.rb', line 24

def create_workflow_trigger(id, options = {})
  make_json_api_request :post, "v2/#{}/workflows/#{id}/triggers", private_generate_resource("triggers", options)
end

#update_workflow_trigger(id, options = {}) ⇒ Object

Public: Update a workflow trigger. id - Required. The String id of the workflow trigger

options - A Hash of options.

- provider      - Required. Required. A String indicating a provider.
- trigger_type  - Required. A String indicating the automation
                  trigger type.
- properties    - Optional. An Object containing properties for the given trigger.

Returns a Drip::Response. See www.getdrip.com/docs/rest-api#workflows



39
40
41
# File 'lib/drip/client/workflow_triggers.rb', line 39

def update_workflow_trigger(id, options = {})
  make_json_api_request :put, "v2/#{}/workflows/#{id}/triggers", private_generate_resource("triggers", options)
end

#workflow_triggers(id) ⇒ Object

Public: List all workflow triggers. id - Required. The String id of the workflow

Returns a Drip::Response. See www.getdrip.com/docs/rest-api#workflow_triggers



9
10
11
# File 'lib/drip/client/workflow_triggers.rb', line 9

def workflow_triggers(id)
  make_json_api_request :get, "v2/#{}/workflows/#{id}/triggers"
end