module Drip::Client::WorkflowTriggers

Public Instance Methods

create_workflow_trigger(id, options = {}) click to toggle source

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

# File lib/drip/client/workflow_triggers.rb, line 26
def create_workflow_trigger(id, options = {})
  make_json_api_request :post, "v2/#{account_id}/workflows/#{id}/triggers", private_generate_resource("triggers", options)
end
update_workflow_trigger(id, options = {}) click to toggle source

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

# File lib/drip/client/workflow_triggers.rb, line 41
def update_workflow_trigger(id, options = {})
  make_json_api_request :put, "v2/#{account_id}/workflows/#{id}/triggers", private_generate_resource("triggers", options)
end
workflow_triggers(id) click to toggle source

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

# File lib/drip/client/workflow_triggers.rb, line 11
def workflow_triggers(id)
  make_json_api_request :get, "v2/#{account_id}/workflows/#{id}/triggers"
end