Module: Drip::Client::WorkflowTriggers
- Included in:
- Drip::Client
- Defined in:
- lib/drip/client/workflow_triggers.rb
Instance Method Summary collapse
-
#create_workflow_trigger(id, options = {}) ⇒ Object
Public: Create a workflow trigger.
-
#update_workflow_trigger(id, options = {}) ⇒ Object
Public: Update a workflow trigger.
-
#workflow_triggers(id) ⇒ Object
Public: List all workflow triggers.
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
26 27 28 |
# File 'lib/drip/client/workflow_triggers.rb', line 26 def create_workflow_trigger(id, = {}) make_json_api_request :post, "v2/#{account_id}/workflows/#{id}/triggers", private_generate_resource("triggers", ) 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
41 42 43 |
# File 'lib/drip/client/workflow_triggers.rb', line 41 def update_workflow_trigger(id, = {}) make_json_api_request :put, "v2/#{account_id}/workflows/#{id}/triggers", private_generate_resource("triggers", ) 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
11 12 13 |
# 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 |