Class: Databasedotcom::Flow
- Inherits:
-
Object
- Object
- Databasedotcom::Flow
- Defined in:
- lib/databasedotcom/flow.rb
Overview
A Salesforce API endpoint that can trigger predefinted flows in salesforce to kick off salesforce side processes. A flow can be triggered by its unique name and can be passed a hash of input variables.
Instance Method Summary collapse
-
#initialize(client, flow_name, params = {}, options = {}) ⇒ Flow
constructor
A new instance of Flow.
- #run ⇒ Object
Constructor Details
#initialize(client, flow_name, params = {}, options = {}) ⇒ Flow
Returns a new instance of Flow.
6 7 8 9 10 11 |
# File 'lib/databasedotcom/flow.rb', line 6 def initialize(client, flow_name, params = {}, = {}) @client = client @flow_name = flow_name @params = params @version = [:version] || '32.0' end |
Instance Method Details
#run ⇒ Object
13 14 15 16 |
# File 'lib/databasedotcom/flow.rb', line 13 def run params_hash = {inputs: [@params]} @client.http_post(flow_url, params_hash.to_json) end |