Method: DocuSign_eSign::FoldersApi#list_with_http_info

Defined in:
lib/docusign_esign/api/folders_api.rb

#list_with_http_info(account_id, options = DocuSign_eSign::ListOptions.default) ⇒ Array<(FoldersResponse, Fixnum, Hash)>

Gets a list of the folders for the account. Retrieves a list of the folders for the account, including the folder hierarchy. You can specify whether to return just the template folder or template folder and normal folders by setting the &#x60;template&#x60; query string parameter.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(FoldersResponse, Fixnum, Hash)>)

    FoldersResponse data, response status code and response headers



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/docusign_esign/api/folders_api.rb', line 120

def list_with_http_info(, options = DocuSign_eSign::ListOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FoldersApi.list ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FoldersApi.list" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/folders".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'include'] = options.include if !options.include.nil?
  query_params[:'include_items'] = options.include_items if !options.include_items.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?
  query_params[:'template'] = options.template if !options.template.nil?
  query_params[:'user_filter'] = options.user_filter if !options.user_filter.nil?

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

  # form parameters
  form_params = {}

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