Class: DocuSign_Maestro::WorkflowTriggerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_maestro/api/workflow_trigger_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = WorkflowTriggerApi.default) ⇒ WorkflowTriggerApi



32
33
34
# File 'lib/docusign_maestro/api/workflow_trigger_api.rb', line 32

def initialize(api_client = WorkflowTriggerApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



30
31
32
# File 'lib/docusign_maestro/api/workflow_trigger_api.rb', line 30

def api_client
  @api_client
end

Instance Method Details

#trigger_workflow(account_id, body, options = DocuSign_Maestro::TriggerWorkflowOptions.default) ⇒ TriggerWorkflowViaPostResponse

Creates a new workflow instance after authenticating with DS Account Server Creates a new workflow instance after authenticating with DS Account Server



42
43
44
45
# File 'lib/docusign_maestro/api/workflow_trigger_api.rb', line 42

def trigger_workflow(, body, options = DocuSign_Maestro::TriggerWorkflowOptions.default)
  data, _status_code, _headers = trigger_workflow_with_http_info(,  body, options)
  return data
end

#trigger_workflow_with_http_info(account_id, body, options = DocuSign_Maestro::TriggerWorkflowOptions.default) ⇒ Array<(TriggerWorkflowViaPostResponse, Fixnum, Hash)>

Creates a new workflow instance after authenticating with DS Account Server Creates a new workflow instance after authenticating with DS Account Server



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/docusign_maestro/api/workflow_trigger_api.rb', line 53

def trigger_workflow_with_http_info(, body, options = DocuSign_Maestro::TriggerWorkflowOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkflowTriggerApi.trigger_workflow ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling WorkflowTriggerApi.trigger_workflow" if .nil?
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling WorkflowTriggerApi.trigger_workflow" if body.nil?
  # resource path
  local_var_path = "aow-auth/v1.0/accounts/{accountId}/workflows/trigger".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'mtid'] = options.mtid if !options.mtid.nil?
  query_params[:'mtsec'] = options.mtsec if !options.mtsec.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TriggerWorkflowViaPostResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowTriggerApi#trigger_workflow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end