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 https://www.getdrip.com/docs/rest-api#workflows
28 29 30 |
# File 'lib/drip/client/workflow_triggers.rb', line 28 def create_workflow_trigger(id, = {}) make_json_api_request :post, "v2/#{account_id}/workflows/#{CGI.escape id.to_s}/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 https://www.getdrip.com/docs/rest-api#workflows
43 44 45 |
# File 'lib/drip/client/workflow_triggers.rb', line 43 def update_workflow_trigger(id, = {}) make_json_api_request :put, "v2/#{account_id}/workflows/#{CGI.escape id.to_s}/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 https://www.getdrip.com/docs/rest-api#workflow_triggers
13 14 15 |
# File 'lib/drip/client/workflow_triggers.rb', line 13 def workflow_triggers(id) make_json_api_request :get, "v2/#{account_id}/workflows/#{CGI.escape id.to_s}/triggers" end |