Class: DocuSign_Rooms::TaskListsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_rooms/api/task_lists_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = TaskListsApi.default) ⇒ TaskListsApi

Returns a new instance of TaskListsApi.



20
21
22
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 20

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



18
19
20
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 18

def api_client
  @api_client
end

Instance Method Details

#create_task_list(room_id, account_id, body) ⇒ TaskList

Add a task list to a room based on a task list template. Applies a task list to a room, based on the ‘taskTemplateId` that you specify in the `taskList` request body.

Parameters:

  • room_id

    Room ID.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details for task list creation (optional parameter)

Returns:



30
31
32
33
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 30

def create_task_list(room_id, , body)
  data, _status_code, _headers = create_task_list_with_http_info(room_id, ,  body)
  return data
end

#create_task_list_with_http_info(room_id, account_id, body) ⇒ Array<(TaskList, Fixnum, Hash)>

Add a task list to a room based on a task list template. Applies a task list to a room, based on the &#x60;taskTemplateId&#x60; that you specify in the &#x60;taskList&#x60; request body.

Parameters:

  • room_id

    Room ID.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details for task list creation (optional parameter)

Returns:

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

    TaskList data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
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
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 41

def create_task_list_with_http_info(room_id, , body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TaskListsApi.create_task_list ..."
  end
  # verify the required parameter 'room_id' is set
  fail ArgumentError, "Missing the required parameter 'room_id' when calling TaskListsApi.create_task_list" if room_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TaskListsApi.create_task_list" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/rooms/{roomId}/task_lists".sub('{format}','json').sub('{' + 'roomId' + '}', room_id.to_s).sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', '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 => 'TaskList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaskListsApi#create_task_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_task_list(task_list_id, account_id) ⇒ nil

Deletes a task list. If there are attached documents they will remain in the associated room. Deletes the specified task list from a room. If there are attached documents, they will remain in the associated room.

Parameters:

  • task_list_id

    Task List ID

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (nil)


86
87
88
89
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 86

def delete_task_list(task_list_id, )
  delete_task_list_with_http_info(task_list_id, )
  return nil
end

#delete_task_list_with_http_info(task_list_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>

Deletes a task list. If there are attached documents they will remain in the associated room. Deletes the specified task list from a room. If there are attached documents, they will remain in the associated room.

Parameters:

  • task_list_id

    Task List ID

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

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

    nil, response status code and response headers



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 96

def delete_task_list_with_http_info(task_list_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TaskListsApi.delete_task_list ..."
  end
  # verify the required parameter 'task_list_id' is set
  fail ArgumentError, "Missing the required parameter 'task_list_id' when calling TaskListsApi.delete_task_list" if task_list_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TaskListsApi.delete_task_list" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/task_lists/{taskListId}".sub('{format}','json').sub('{' + 'taskListId' + '}', task_list_id.to_s).sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json'])

  # form parameters
  form_params = {}

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

#get_task_lists(room_id, account_id) ⇒ TaskListSummaryList

Returns the summary for all viewable task lists in a room. Returns the task lists associated with a room.

Parameters:

  • room_id

    Room ID

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:



140
141
142
143
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 140

def get_task_lists(room_id, )
  data, _status_code, _headers = get_task_lists_with_http_info(room_id, )
  return data
end

#get_task_lists_with_http_info(room_id, account_id) ⇒ Array<(TaskListSummaryList, Fixnum, Hash)>

Returns the summary for all viewable task lists in a room. Returns the task lists associated with a room.

Parameters:

  • room_id

    Room ID

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

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

    TaskListSummaryList data, response status code and response headers



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/docusign_rooms/api/task_lists_api.rb', line 150

def get_task_lists_with_http_info(room_id, )
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TaskListsApi.get_task_lists ..."
  end
  # verify the required parameter 'room_id' is set
  fail ArgumentError, "Missing the required parameter 'room_id' when calling TaskListsApi.get_task_lists" if room_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TaskListsApi.get_task_lists" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/rooms/{roomId}/task_lists".sub('{format}','json').sub('{' + 'roomId' + '}', room_id.to_s).sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', '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 => 'TaskListSummaryList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TaskListsApi#get_task_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end