Class: Buildium::TasksApi

Inherits:
Object
  • Object
show all
Defined in:
lib/buildium-ruby/api/tasks_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TasksApi

Returns a new instance of TasksApi.



19
20
21
# File 'lib/buildium-ruby/api/tasks_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/buildium-ruby/api/tasks_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_contact_request_task(contact_request_task_post_message, opts = {}) ⇒ ContactRequestTaskMessage

Create a contact request Creates a contact request. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

Returns:



27
28
29
30
# File 'lib/buildium-ruby/api/tasks_api.rb', line 27

def create_contact_request_task(contact_request_task_post_message, opts = {})
  data, _status_code, _headers = create_contact_request_task_with_http_info(contact_request_task_post_message, opts)
  data
end

#create_contact_request_task_with_http_info(contact_request_task_post_message, opts = {}) ⇒ Array<(ContactRequestTaskMessage, Integer, Hash)>

Create a contact request Creates a contact request. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

  • (Array<(ContactRequestTaskMessage, Integer, Hash)>)

    ContactRequestTaskMessage data, response status code and response headers



37
38
39
40
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
80
81
82
83
84
85
86
87
88
# File 'lib/buildium-ruby/api/tasks_api.rb', line 37

def create_contact_request_task_with_http_info(contact_request_task_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.create_contact_request_task ...'
  end
  # verify the required parameter 'contact_request_task_post_message' is set
  if @api_client.config.client_side_validation && contact_request_task_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'contact_request_task_post_message' when calling TasksApi.create_contact_request_task"
  end
  # resource path
  local_var_path = '/v1/tasks/contactrequests'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_request_task_post_message)

  # return_type
  return_type = opts[:debug_return_type] || 'ContactRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.create_contact_request_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#create_contact_request_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rental_owner_request_task(rental_owner_request_task_post_message, opts = {}) ⇒ RentalOwnerRequestTaskMessage

Create a rental owner request Creates a rental owner request. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

Returns:



95
96
97
98
# File 'lib/buildium-ruby/api/tasks_api.rb', line 95

def create_rental_owner_request_task(rental_owner_request_task_post_message, opts = {})
  data, _status_code, _headers = create_rental_owner_request_task_with_http_info(rental_owner_request_task_post_message, opts)
  data
end

#create_rental_owner_request_task_with_http_info(rental_owner_request_task_post_message, opts = {}) ⇒ Array<(RentalOwnerRequestTaskMessage, Integer, Hash)>

Create a rental owner request Creates a rental owner request. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:



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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/buildium-ruby/api/tasks_api.rb', line 105

def create_rental_owner_request_task_with_http_info(rental_owner_request_task_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.create_rental_owner_request_task ...'
  end
  # verify the required parameter 'rental_owner_request_task_post_message' is set
  if @api_client.config.client_side_validation && rental_owner_request_task_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_owner_request_task_post_message' when calling TasksApi.create_rental_owner_request_task"
  end
  # resource path
  local_var_path = '/v1/tasks/rentalownerrequests'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(rental_owner_request_task_post_message)

  # return_type
  return_type = opts[:debug_return_type] || 'RentalOwnerRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.create_rental_owner_request_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#create_rental_owner_request_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_resource(resident_request_task_post_message, opts = {}) ⇒ ResidentRequestTaskMessage

Create a resident request Creates a resident request. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

Returns:



163
164
165
166
# File 'lib/buildium-ruby/api/tasks_api.rb', line 163

def create_resource(resident_request_task_post_message, opts = {})
  data, _status_code, _headers = create_resource_with_http_info(resident_request_task_post_message, opts)
  data
end

#create_resource_with_http_info(resident_request_task_post_message, opts = {}) ⇒ Array<(ResidentRequestTaskMessage, Integer, Hash)>

Create a resident request Creates a resident request. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

  • (Array<(ResidentRequestTaskMessage, Integer, Hash)>)

    ResidentRequestTaskMessage data, response status code and response headers



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/buildium-ruby/api/tasks_api.rb', line 173

def create_resource_with_http_info(resident_request_task_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.create_resource ...'
  end
  # verify the required parameter 'resident_request_task_post_message' is set
  if @api_client.config.client_side_validation && resident_request_task_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'resident_request_task_post_message' when calling TasksApi.create_resource"
  end
  # resource path
  local_var_path = '/v1/tasks/residentrequests'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(resident_request_task_post_message)

  # return_type
  return_type = opts[:debug_return_type] || 'ResidentRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.create_resource",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#create_resource\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_task_category(task_category_save_message, opts = {}) ⇒ TaskCategoryMessage

Create a task category Create a task category. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

Returns:



231
232
233
234
# File 'lib/buildium-ruby/api/tasks_api.rb', line 231

def create_task_category(task_category_save_message, opts = {})
  data, _status_code, _headers = create_task_category_with_http_info(task_category_save_message, opts)
  data
end

#create_task_category_with_http_info(task_category_save_message, opts = {}) ⇒ Array<(TaskCategoryMessage, Integer, Hash)>

Create a task category Create a task category. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

  • (Array<(TaskCategoryMessage, Integer, Hash)>)

    TaskCategoryMessage data, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/buildium-ruby/api/tasks_api.rb', line 241

def create_task_category_with_http_info(task_category_save_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.create_task_category ...'
  end
  # verify the required parameter 'task_category_save_message' is set
  if @api_client.config.client_side_validation && task_category_save_message.nil?
    fail ArgumentError, "Missing the required parameter 'task_category_save_message' when calling TasksApi.create_task_category"
  end
  # resource path
  local_var_path = '/v1/tasks/categories'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(task_category_save_message)

  # return_type
  return_type = opts[:debug_return_type] || 'TaskCategoryMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.create_task_category",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#create_task_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_to_do_task(to_do_task_post_message, opts = {}) ⇒ ToDoTaskMessage

Create a to do task Creates a to do task. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • to_do_task_post_message (ToDoTaskPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



299
300
301
302
# File 'lib/buildium-ruby/api/tasks_api.rb', line 299

def create_to_do_task(to_do_task_post_message, opts = {})
  data, _status_code, _headers = create_to_do_task_with_http_info(to_do_task_post_message, opts)
  data
end

#create_to_do_task_with_http_info(to_do_task_post_message, opts = {}) ⇒ Array<(ToDoTaskMessage, Integer, Hash)>

Create a to do task Creates a to do task. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • to_do_task_post_message (ToDoTaskPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ToDoTaskMessage, Integer, Hash)>)

    ToDoTaskMessage data, response status code and response headers



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/buildium-ruby/api/tasks_api.rb', line 309

def create_to_do_task_with_http_info(to_do_task_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.create_to_do_task ...'
  end
  # verify the required parameter 'to_do_task_post_message' is set
  if @api_client.config.client_side_validation && to_do_task_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'to_do_task_post_message' when calling TasksApi.create_to_do_task"
  end
  # resource path
  local_var_path = '/v1/tasks/todorequests'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(to_do_task_post_message)

  # return_type
  return_type = opts[:debug_return_type] || 'ToDoTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.create_to_do_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#create_to_do_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_task_history_file(task_id, task_history_id, file_id, opts = {}) ⇒ nil

Delete task history file Deletes a specific file from a task history record. The file will be permanently deleted from the Buildium platform an can not be recovered. associated with a task history record. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit` `Delete`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


369
370
371
372
# File 'lib/buildium-ruby/api/tasks_api.rb', line 369

def delete_task_history_file(task_id, task_history_id, file_id, opts = {})
  delete_task_history_file_with_http_info(task_id, task_history_id, file_id, opts)
  nil
end

#delete_task_history_file_with_http_info(task_id, task_history_id, file_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete task history file Deletes a specific file from a task history record. The file will be permanently deleted from the Buildium platform an can not be recovered. associated with a task history record. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &#x60;Delete&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/buildium-ruby/api/tasks_api.rb', line 381

def delete_task_history_file_with_http_info(task_id, task_history_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.delete_task_history_file ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.delete_task_history_file"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.delete_task_history_file"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling TasksApi.delete_task_history_file"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}/files/{fileId}'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.delete_task_history_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#delete_task_history_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_rental_owner_request_tasks(opts = {}) ⇒ Array<RentalOwnerRequestTaskMessage>

Retrieve all rental owner requests Retrieves all rental owner requests. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



456
457
458
459
# File 'lib/buildium-ruby/api/tasks_api.rb', line 456

def get_all_rental_owner_request_tasks(opts = {})
  data, _status_code, _headers = get_all_rental_owner_request_tasks_with_http_info(opts)
  data
end

#get_all_rental_owner_request_tasks_with_http_info(opts = {}) ⇒ Array<(Array<RentalOwnerRequestTaskMessage>, Integer, Hash)>

Retrieve all rental owner requests Retrieves all rental owner requests. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<RentalOwnerRequestTaskMessage>, Integer, Hash)>)

    Array<RentalOwnerRequestTaskMessage> data, response status code and response headers



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
# File 'lib/buildium-ruby/api/tasks_api.rb', line 480

def get_all_rental_owner_request_tasks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_all_rental_owner_request_tasks ...'
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  allowable_values = ["New", "InProgress", "Completed", "Deferred", "Closed"]
  if @api_client.config.client_side_validation && opts[:'statuses'] && !opts[:'statuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"statuses\", must include one of #{allowable_values}"
  end
  allowable_values = ["Low", "Normal", "High"]
  if @api_client.config.client_side_validation && opts[:'priorities'] && !opts[:'priorities'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"priorities\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/tasks/rentalownerrequests'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
  query_params[:'unitid'] = opts[:'unitid'] if !opts[:'unitid'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'duedatefrom'] = opts[:'duedatefrom'] if !opts[:'duedatefrom'].nil?
  query_params[:'duedateto'] = opts[:'duedateto'] if !opts[:'duedateto'].nil?
  query_params[:'taskcategoryid'] = opts[:'taskcategoryid'] if !opts[:'taskcategoryid'].nil?
  query_params[:'priorities'] = @api_client.build_collection_param(opts[:'priorities'], :multi) if !opts[:'priorities'].nil?
  query_params[:'assignedtoid'] = opts[:'assignedtoid'] if !opts[:'assignedtoid'].nil?
  query_params[:'tasktitle'] = opts[:'tasktitle'] if !opts[:'tasktitle'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RentalOwnerRequestTaskMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_all_rental_owner_request_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_all_rental_owner_request_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_task_categories(opts = {}) ⇒ Array<TaskCategoryMessage>

Retrieve all task categories Retrieves a list of task categories. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



558
559
560
561
# File 'lib/buildium-ruby/api/tasks_api.rb', line 558

def get_all_task_categories(opts = {})
  data, _status_code, _headers = get_all_task_categories_with_http_info(opts)
  data
end

#get_all_task_categories_with_http_info(opts = {}) ⇒ Array<(Array<TaskCategoryMessage>, Integer, Hash)>

Retrieve all task categories Retrieves a list of task categories. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<TaskCategoryMessage>, Integer, Hash)>)

    Array<TaskCategoryMessage> data, response status code and response headers



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/buildium-ruby/api/tasks_api.rb', line 570

def get_all_task_categories_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_all_task_categories ...'
  end
  # resource path
  local_var_path = '/v1/tasks/categories'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<TaskCategoryMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_all_task_categories",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_all_task_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_task_history_files(task_id, task_history_id, opts = {}) ⇒ Array<TaskHistoryFileMessage>

Retrieve all task history files Retrieves the metadata for all files associated with a task history record. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



626
627
628
629
# File 'lib/buildium-ruby/api/tasks_api.rb', line 626

def get_all_task_history_files(task_id, task_history_id, opts = {})
  data, _status_code, _headers = get_all_task_history_files_with_http_info(task_id, task_history_id, opts)
  data
end

#get_all_task_history_files_with_http_info(task_id, task_history_id, opts = {}) ⇒ Array<(Array<TaskHistoryFileMessage>, Integer, Hash)>

Retrieve all task history files Retrieves the metadata for all files associated with a task history record. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<TaskHistoryFileMessage>, Integer, Hash)>)

    Array<TaskHistoryFileMessage> data, response status code and response headers



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
# File 'lib/buildium-ruby/api/tasks_api.rb', line 640

def get_all_task_history_files_with_http_info(task_id, task_history_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_all_task_history_files ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_all_task_history_files"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.get_all_task_history_files"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}/files'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<TaskHistoryFileMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_all_task_history_files",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_all_task_history_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_tasks(opts = {}) ⇒ Array<AllTasksMessage>

Retrieve all tasks Retrieves a list of tasks. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :type (String)

    Filters results to any task associated with the task type specified.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :unitagreementid (Integer)

    Filters results to any task associated with the unit agreement identifier specified.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



716
717
718
719
# File 'lib/buildium-ruby/api/tasks_api.rb', line 716

def get_all_tasks(opts = {})
  data, _status_code, _headers = get_all_tasks_with_http_info(opts)
  data
end

#get_all_tasks_with_http_info(opts = {}) ⇒ Array<(Array<AllTasksMessage>, Integer, Hash)>

Retrieve all tasks Retrieves a list of tasks. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :type (String)

    Filters results to any task associated with the task type specified.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :unitagreementid (Integer)

    Filters results to any task associated with the unit agreement identifier specified.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<AllTasksMessage>, Integer, Hash)>)

    Array<AllTasksMessage> data, response status code and response headers



742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
# File 'lib/buildium-ruby/api/tasks_api.rb', line 742

def get_all_tasks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_all_tasks ...'
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  allowable_values = ["New", "InProgress", "Completed", "Deferred", "Closed"]
  if @api_client.config.client_side_validation && opts[:'statuses'] && !opts[:'statuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"statuses\", must include one of #{allowable_values}"
  end
  allowable_values = ["ContactRequest", "ResidentRequest", "Todo", "RentalOwnerRequest"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  allowable_values = ["Low", "Normal", "High"]
  if @api_client.config.client_side_validation && opts[:'priorities'] && !opts[:'priorities'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"priorities\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/tasks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'unitid'] = opts[:'unitid'] if !opts[:'unitid'].nil?
  query_params[:'unitagreementid'] = opts[:'unitagreementid'] if !opts[:'unitagreementid'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'duedatefrom'] = opts[:'duedatefrom'] if !opts[:'duedatefrom'].nil?
  query_params[:'duedateto'] = opts[:'duedateto'] if !opts[:'duedateto'].nil?
  query_params[:'taskcategoryid'] = opts[:'taskcategoryid'] if !opts[:'taskcategoryid'].nil?
  query_params[:'priorities'] = @api_client.build_collection_param(opts[:'priorities'], :multi) if !opts[:'priorities'].nil?
  query_params[:'assignedtoid'] = opts[:'assignedtoid'] if !opts[:'assignedtoid'].nil?
  query_params[:'tasktitle'] = opts[:'tasktitle'] if !opts[:'tasktitle'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<AllTasksMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_all_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_all_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_contact_request_task_by_id(contact_request_task_id, opts = {}) ⇒ ContactRequestTaskMessage

Retrieve a contact request Retrieves a contact request. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • contact_request_task_id (Integer)

    The contact request identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



824
825
826
827
# File 'lib/buildium-ruby/api/tasks_api.rb', line 824

def get_contact_request_task_by_id(contact_request_task_id, opts = {})
  data, _status_code, _headers = get_contact_request_task_by_id_with_http_info(contact_request_task_id, opts)
  data
end

#get_contact_request_task_by_id_with_http_info(contact_request_task_id, opts = {}) ⇒ Array<(ContactRequestTaskMessage, Integer, Hash)>

Retrieve a contact request Retrieves a contact request. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • contact_request_task_id (Integer)

    The contact request identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ContactRequestTaskMessage, Integer, Hash)>)

    ContactRequestTaskMessage data, response status code and response headers



834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/buildium-ruby/api/tasks_api.rb', line 834

def get_contact_request_task_by_id_with_http_info(contact_request_task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_contact_request_task_by_id ...'
  end
  # verify the required parameter 'contact_request_task_id' is set
  if @api_client.config.client_side_validation && contact_request_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_request_task_id' when calling TasksApi.get_contact_request_task_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/contactrequests/{contactRequestTaskId}'.sub('{' + 'contactRequestTaskId' + '}', CGI.escape(contact_request_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ContactRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_contact_request_task_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_contact_request_task_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_contact_request_tasks(opts = {}) ⇒ Array<ContactRequestTaskMessage>

Retrieve all contact requests Retrieves a list of contact requests. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



901
902
903
904
# File 'lib/buildium-ruby/api/tasks_api.rb', line 901

def get_contact_request_tasks(opts = {})
  data, _status_code, _headers = get_contact_request_tasks_with_http_info(opts)
  data
end

#get_contact_request_tasks_with_http_info(opts = {}) ⇒ Array<(Array<ContactRequestTaskMessage>, Integer, Hash)>

Retrieve all contact requests Retrieves a list of contact requests. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<ContactRequestTaskMessage>, Integer, Hash)>)

    Array<ContactRequestTaskMessage> data, response status code and response headers



925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
# File 'lib/buildium-ruby/api/tasks_api.rb', line 925

def get_contact_request_tasks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_contact_request_tasks ...'
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  allowable_values = ["New", "InProgress", "Completed", "Deferred", "Closed"]
  if @api_client.config.client_side_validation && opts[:'statuses'] && !opts[:'statuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"statuses\", must include one of #{allowable_values}"
  end
  allowable_values = ["Low", "Normal", "High"]
  if @api_client.config.client_side_validation && opts[:'priorities'] && !opts[:'priorities'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"priorities\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/tasks/contactrequests'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
  query_params[:'unitid'] = opts[:'unitid'] if !opts[:'unitid'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'duedatefrom'] = opts[:'duedatefrom'] if !opts[:'duedatefrom'].nil?
  query_params[:'duedateto'] = opts[:'duedateto'] if !opts[:'duedateto'].nil?
  query_params[:'taskcategoryid'] = opts[:'taskcategoryid'] if !opts[:'taskcategoryid'].nil?
  query_params[:'priorities'] = @api_client.build_collection_param(opts[:'priorities'], :multi) if !opts[:'priorities'].nil?
  query_params[:'assignedtoid'] = opts[:'assignedtoid'] if !opts[:'assignedtoid'].nil?
  query_params[:'tasktitle'] = opts[:'tasktitle'] if !opts[:'tasktitle'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ContactRequestTaskMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_contact_request_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_contact_request_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_file_download_request(task_id, task_history_id, file_id, opts = {}) ⇒ FileDownloadMessage

Download a task history file Downloads a specific file associated to the task history record. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1003
1004
1005
1006
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1003

def get_file_download_request(task_id, task_history_id, file_id, opts = {})
  data, _status_code, _headers = get_file_download_request_with_http_info(task_id, task_history_id, file_id, opts)
  data
end

#get_file_download_request_with_http_info(task_id, task_history_id, file_id, opts = {}) ⇒ Array<(FileDownloadMessage, Integer, Hash)>

Download a task history file Downloads a specific file associated to the task history record. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FileDownloadMessage, Integer, Hash)>)

    FileDownloadMessage data, response status code and response headers



1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1015

def get_file_download_request_with_http_info(task_id, task_history_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_file_download_request ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_file_download_request"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.get_file_download_request"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling TasksApi.get_file_download_request"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}/files/{fileId}/downloadrequest'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FileDownloadMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_file_download_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_file_download_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_owner_request_task_by_id(rental_owner_request_task_id, opts = {}) ⇒ RentalOwnerRequestTaskMessage

Retrieve a rental owner request Retrieves a specific rental owner request. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • rental_owner_request_task_id (Integer)

    The rental owner request identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1076
1077
1078
1079
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1076

def get_rental_owner_request_task_by_id(rental_owner_request_task_id, opts = {})
  data, _status_code, _headers = get_rental_owner_request_task_by_id_with_http_info(rental_owner_request_task_id, opts)
  data
end

#get_rental_owner_request_task_by_id_with_http_info(rental_owner_request_task_id, opts = {}) ⇒ Array<(RentalOwnerRequestTaskMessage, Integer, Hash)>

Retrieve a rental owner request Retrieves a specific rental owner request. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • rental_owner_request_task_id (Integer)

    The rental owner request identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1086

def get_rental_owner_request_task_by_id_with_http_info(rental_owner_request_task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_rental_owner_request_task_by_id ...'
  end
  # verify the required parameter 'rental_owner_request_task_id' is set
  if @api_client.config.client_side_validation && rental_owner_request_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'rental_owner_request_task_id' when calling TasksApi.get_rental_owner_request_task_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/rentalownerrequests/{rentalOwnerRequestTaskId}'.sub('{' + 'rentalOwnerRequestTaskId' + '}', CGI.escape(rental_owner_request_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RentalOwnerRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_rental_owner_request_task_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_rental_owner_request_task_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_resident_request_task(resident_request_task_id, opts = {}) ⇒ ResidentRequestTaskMessage

Retrieve a resident request Retrieves a specific resident request. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • resident_request_task_id (Integer)

    The resident request identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1139
1140
1141
1142
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1139

def get_resident_request_task(resident_request_task_id, opts = {})
  data, _status_code, _headers = get_resident_request_task_with_http_info(resident_request_task_id, opts)
  data
end

#get_resident_request_task_with_http_info(resident_request_task_id, opts = {}) ⇒ Array<(ResidentRequestTaskMessage, Integer, Hash)>

Retrieve a resident request Retrieves a specific resident request. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • resident_request_task_id (Integer)

    The resident request identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ResidentRequestTaskMessage, Integer, Hash)>)

    ResidentRequestTaskMessage data, response status code and response headers



1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1149

def get_resident_request_task_with_http_info(resident_request_task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_resident_request_task ...'
  end
  # verify the required parameter 'resident_request_task_id' is set
  if @api_client.config.client_side_validation && resident_request_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'resident_request_task_id' when calling TasksApi.get_resident_request_task"
  end
  # resource path
  local_var_path = '/v1/tasks/residentrequests/{residentRequestTaskId}'.sub('{' + 'residentRequestTaskId' + '}', CGI.escape(resident_request_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ResidentRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_resident_request_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_resident_request_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_resident_request_tasks(opts = {}) ⇒ Array<ResidentRequestTaskMessage>

Retrieve all resident requests Retrieves a list of resident requests. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :unitagreementid (Integer)

    Filters results to any task associated with the unit agreement identifier specified.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



1217
1218
1219
1220
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1217

def get_resident_request_tasks(opts = {})
  data, _status_code, _headers = get_resident_request_tasks_with_http_info(opts)
  data
end

#get_resident_request_tasks_with_http_info(opts = {}) ⇒ Array<(Array<ResidentRequestTaskMessage>, Integer, Hash)>

Retrieve all resident requests Retrieves a list of resident requests. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :unitagreementid (Integer)

    Filters results to any task associated with the unit agreement identifier specified.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<ResidentRequestTaskMessage>, Integer, Hash)>)

    Array<ResidentRequestTaskMessage> data, response status code and response headers



1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1242

def get_resident_request_tasks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_resident_request_tasks ...'
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  allowable_values = ["New", "InProgress", "Completed", "Deferred", "Closed"]
  if @api_client.config.client_side_validation && opts[:'statuses'] && !opts[:'statuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"statuses\", must include one of #{allowable_values}"
  end
  allowable_values = ["Low", "Normal", "High"]
  if @api_client.config.client_side_validation && opts[:'priorities'] && !opts[:'priorities'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"priorities\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/tasks/residentrequests'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
  query_params[:'unitid'] = opts[:'unitid'] if !opts[:'unitid'].nil?
  query_params[:'unitagreementid'] = opts[:'unitagreementid'] if !opts[:'unitagreementid'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'duedatefrom'] = opts[:'duedatefrom'] if !opts[:'duedatefrom'].nil?
  query_params[:'duedateto'] = opts[:'duedateto'] if !opts[:'duedateto'].nil?
  query_params[:'taskcategoryid'] = opts[:'taskcategoryid'] if !opts[:'taskcategoryid'].nil?
  query_params[:'priorities'] = @api_client.build_collection_param(opts[:'priorities'], :multi) if !opts[:'priorities'].nil?
  query_params[:'assignedtoid'] = opts[:'assignedtoid'] if !opts[:'assignedtoid'].nil?
  query_params[:'tasktitle'] = opts[:'tasktitle'] if !opts[:'tasktitle'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ResidentRequestTaskMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_resident_request_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_resident_request_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_task_by_id(task_id, opts = {}) ⇒ AllTasksMessage

Retrieve a task Retrieves a specific task. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_id (Integer)

    The task identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1319
1320
1321
1322
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1319

def get_task_by_id(task_id, opts = {})
  data, _status_code, _headers = get_task_by_id_with_http_info(task_id, opts)
  data
end

#get_task_by_id_with_http_info(task_id, opts = {}) ⇒ Array<(AllTasksMessage, Integer, Hash)>

Retrieve a task Retrieves a specific task. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_id (Integer)

    The task identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AllTasksMessage, Integer, Hash)>)

    AllTasksMessage data, response status code and response headers



1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1329

def get_task_by_id_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_task_by_id ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_task_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AllTasksMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_task_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_task_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_task_category_by_id(task_category_id, opts = {}) ⇒ TaskCategoryMessage

Retrieve a task category Retrieves a specific task category. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_category_id (Integer)

    The task category identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1382
1383
1384
1385
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1382

def get_task_category_by_id(task_category_id, opts = {})
  data, _status_code, _headers = get_task_category_by_id_with_http_info(task_category_id, opts)
  data
end

#get_task_category_by_id_with_http_info(task_category_id, opts = {}) ⇒ Array<(TaskCategoryMessage, Integer, Hash)>

Retrieve a task category Retrieves a specific task category. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_category_id (Integer)

    The task category identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TaskCategoryMessage, Integer, Hash)>)

    TaskCategoryMessage data, response status code and response headers



1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1392

def get_task_category_by_id_with_http_info(task_category_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_task_category_by_id ...'
  end
  # verify the required parameter 'task_category_id' is set
  if @api_client.config.client_side_validation && task_category_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_category_id' when calling TasksApi.get_task_category_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/categories/{taskCategoryId}'.sub('{' + 'taskCategoryId' + '}', CGI.escape(task_category_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TaskCategoryMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_task_category_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_task_category_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_task_histories(task_id, opts = {}) ⇒ Array<TaskHistoryMessage>

Retrieve all task history Retrieves all task history records for a specific task. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



1448
1449
1450
1451
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1448

def get_task_histories(task_id, opts = {})
  data, _status_code, _headers = get_task_histories_with_http_info(task_id, opts)
  data
end

#get_task_histories_with_http_info(task_id, opts = {}) ⇒ Array<(Array<TaskHistoryMessage>, Integer, Hash)>

Retrieve all task history Retrieves all task history records for a specific task. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<TaskHistoryMessage>, Integer, Hash)>)

    Array<TaskHistoryMessage> data, response status code and response headers



1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1461

def get_task_histories_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_task_histories ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_task_histories"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<TaskHistoryMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_task_histories",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_task_histories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_task_history_by_id(task_id, task_history_id, opts = {}) ⇒ TaskHistoryMessage

Retrieve a task history Retrieves a specific task history record for a task. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1518
1519
1520
1521
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1518

def get_task_history_by_id(task_id, task_history_id, opts = {})
  data, _status_code, _headers = get_task_history_by_id_with_http_info(task_id, task_history_id, opts)
  data
end

#get_task_history_by_id_with_http_info(task_id, task_history_id, opts = {}) ⇒ Array<(TaskHistoryMessage, Integer, Hash)>

Retrieve a task history Retrieves a specific task history record for a task. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TaskHistoryMessage, Integer, Hash)>)

    TaskHistoryMessage data, response status code and response headers



1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1529

def get_task_history_by_id_with_http_info(task_id, task_history_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_task_history_by_id ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_task_history_by_id"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.get_task_history_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TaskHistoryMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_task_history_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_task_history_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_task_history_file_by_id(task_id, task_history_id, file_id, opts = {}) ⇒ TaskHistoryFileMessage

Retrieve a task history file Retrieves the metadata for a specific file associated with a task history record. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1588
1589
1590
1591
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1588

def get_task_history_file_by_id(task_id, task_history_id, file_id, opts = {})
  data, _status_code, _headers = get_task_history_file_by_id_with_http_info(task_id, task_history_id, file_id, opts)
  data
end

#get_task_history_file_by_id_with_http_info(task_id, task_history_id, file_id, opts = {}) ⇒ Array<(TaskHistoryFileMessage, Integer, Hash)>

Retrieve a task history file Retrieves the metadata for a specific file associated with a task history record. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • file_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TaskHistoryFileMessage, Integer, Hash)>)

    TaskHistoryFileMessage data, response status code and response headers



1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1600

def get_task_history_file_by_id_with_http_info(task_id, task_history_id, file_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_task_history_file_by_id ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_task_history_file_by_id"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.get_task_history_file_by_id"
  end
  # verify the required parameter 'file_id' is set
  if @api_client.config.client_side_validation && file_id.nil?
    fail ArgumentError, "Missing the required parameter 'file_id' when calling TasksApi.get_task_history_file_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}/files/{fileId}'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TaskHistoryFileMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_task_history_file_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_task_history_file_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_to_do_task_by_id(to_do_task_id, opts = {}) ⇒ ToDoTaskMessage

Retrieve a to do task Retrieves a to do task. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • to_do_task_id (Integer)

    The to do task identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1661
1662
1663
1664
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1661

def get_to_do_task_by_id(to_do_task_id, opts = {})
  data, _status_code, _headers = get_to_do_task_by_id_with_http_info(to_do_task_id, opts)
  data
end

#get_to_do_task_by_id_with_http_info(to_do_task_id, opts = {}) ⇒ Array<(ToDoTaskMessage, Integer, Hash)>

Retrieve a to do task Retrieves a to do task. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • to_do_task_id (Integer)

    The to do task identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ToDoTaskMessage, Integer, Hash)>)

    ToDoTaskMessage data, response status code and response headers



1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1671

def get_to_do_task_by_id_with_http_info(to_do_task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_to_do_task_by_id ...'
  end
  # verify the required parameter 'to_do_task_id' is set
  if @api_client.config.client_side_validation && to_do_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'to_do_task_id' when calling TasksApi.get_to_do_task_by_id"
  end
  # resource path
  local_var_path = '/v1/tasks/todorequests/{toDoTaskId}'.sub('{' + 'toDoTaskId' + '}', CGI.escape(to_do_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ToDoTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_to_do_task_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_to_do_task_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_to_do_tasks(opts = {}) ⇒ Array<ToDoTaskMessage>

Retrieve all to do tasks Retrieves a list of to do tasks. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



1738
1739
1740
1741
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1738

def get_to_do_tasks(opts = {})
  data, _status_code, _headers = get_to_do_tasks_with_http_info(opts)
  data
end

#get_to_do_tasks_with_http_info(opts = {}) ⇒ Array<(Array<ToDoTaskMessage>, Integer, Hash)>

Retrieve all to do tasks Retrieves a list of to do tasks. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :entitytype (String)

    Specifies the type of entity that the &#x60;EntityId&#x60; field refers to. This field is required if the &#x60;EntityId&#x60; field is populated.

  • :entityid (Integer)

    Filters results to any task associated with the specified entity id value. The value must be of the type specified in the &#x60;EntityType&#x60; field.

  • :statuses (Array<String>)

    Filters results by the status of the task. If no status is specified, tasks with any status will be returned.

  • :unitid (Integer)

    Filters results to any task associated with the unit identifier.

  • :lastupdatedfrom (Date)

    Filters results to any tasks were updated on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :lastupdatedto (Date)

    Filters results to any tasks were updated on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedatefrom (Date)

    Filters results to any tasks with a due date on or after the specified date. The value must be formatted as YYYY-MM-DD.

  • :duedateto (Date)

    Filters results to any tasks with a due date on or before the specified date. The value must be formatted as YYYY-MM-DD.

  • :taskcategoryid (Integer)

    Filters results to any tasks with the specified category identifier.

  • :priorities (Array<String>)

    Filters results to any tasks whose priority matches the specified values. If no priority is specified, tasks with any priority will be returned.

  • :assignedtoid (Integer)

    Filters results to any tasks that have been assigned to the specified staff user identifier.

  • :tasktitle (String)

    Filters results to any task whose title contains the specified value.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<ToDoTaskMessage>, Integer, Hash)>)

    Array<ToDoTaskMessage> data, response status code and response headers



1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1762

def get_to_do_tasks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.get_to_do_tasks ...'
  end
  allowable_values = ["Rental", "RentalOwner", "Association"]
  if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype'])
    fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}"
  end
  allowable_values = ["New", "InProgress", "Completed", "Deferred", "Closed"]
  if @api_client.config.client_side_validation && opts[:'statuses'] && !opts[:'statuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"statuses\", must include one of #{allowable_values}"
  end
  allowable_values = ["Low", "Normal", "High"]
  if @api_client.config.client_side_validation && opts[:'priorities'] && !opts[:'priorities'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"priorities\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/tasks/todorequests'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil?
  query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil?
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil?
  query_params[:'unitid'] = opts[:'unitid'] if !opts[:'unitid'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'duedatefrom'] = opts[:'duedatefrom'] if !opts[:'duedatefrom'].nil?
  query_params[:'duedateto'] = opts[:'duedateto'] if !opts[:'duedateto'].nil?
  query_params[:'taskcategoryid'] = opts[:'taskcategoryid'] if !opts[:'taskcategoryid'].nil?
  query_params[:'priorities'] = @api_client.build_collection_param(opts[:'priorities'], :multi) if !opts[:'priorities'].nil?
  query_params[:'assignedtoid'] = opts[:'assignedtoid'] if !opts[:'assignedtoid'].nil?
  query_params[:'tasktitle'] = opts[:'tasktitle'] if !opts[:'tasktitle'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ToDoTaskMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.get_to_do_tasks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#get_to_do_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_contact_request_task(contact_request_task_id, contact_request_task_put_message, opts = {}) ⇒ ContactRequestTaskMessage

Update a contact request Updates a contact request. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • contact_request_task_id (Integer)

    The contact request identifier.

  • contact_request_task_put_message (ContactRequestTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1839
1840
1841
1842
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1839

def update_contact_request_task(contact_request_task_id, contact_request_task_put_message, opts = {})
  data, _status_code, _headers = update_contact_request_task_with_http_info(contact_request_task_id, contact_request_task_put_message, opts)
  data
end

#update_contact_request_task_with_http_info(contact_request_task_id, contact_request_task_put_message, opts = {}) ⇒ Array<(ContactRequestTaskMessage, Integer, Hash)>

Update a contact request Updates a contact request. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • contact_request_task_id (Integer)

    The contact request identifier.

  • contact_request_task_put_message (ContactRequestTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ContactRequestTaskMessage, Integer, Hash)>)

    ContactRequestTaskMessage data, response status code and response headers



1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1850

def update_contact_request_task_with_http_info(contact_request_task_id, contact_request_task_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_contact_request_task ...'
  end
  # verify the required parameter 'contact_request_task_id' is set
  if @api_client.config.client_side_validation && contact_request_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'contact_request_task_id' when calling TasksApi.update_contact_request_task"
  end
  # verify the required parameter 'contact_request_task_put_message' is set
  if @api_client.config.client_side_validation && contact_request_task_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'contact_request_task_put_message' when calling TasksApi.update_contact_request_task"
  end
  # resource path
  local_var_path = '/v1/tasks/contactrequests/{contactRequestTaskId}'.sub('{' + 'contactRequestTaskId' + '}', CGI.escape(contact_request_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(contact_request_task_put_message)

  # return_type
  return_type = opts[:debug_return_type] || 'ContactRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.update_contact_request_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#update_contact_request_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_owner_request_task(rental_owner_request_task_id, rental_owner_request_task_put_message, opts = {}) ⇒ RentalOwnerRequestTaskMessage

Update a rental owner request Updates a rental owner request. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • rental_owner_request_task_id (Integer)

    The rental owner request identifier.

  • rental_owner_request_task_put_message (RentalOwnerRequestTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1913
1914
1915
1916
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1913

def update_rental_owner_request_task(rental_owner_request_task_id, rental_owner_request_task_put_message, opts = {})
  data, _status_code, _headers = update_rental_owner_request_task_with_http_info(rental_owner_request_task_id, rental_owner_request_task_put_message, opts)
  data
end

#update_rental_owner_request_task_with_http_info(rental_owner_request_task_id, rental_owner_request_task_put_message, opts = {}) ⇒ Array<(RentalOwnerRequestTaskMessage, Integer, Hash)>

Update a rental owner request Updates a rental owner request. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • rental_owner_request_task_id (Integer)

    The rental owner request identifier.

  • rental_owner_request_task_put_message (RentalOwnerRequestTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1924

def update_rental_owner_request_task_with_http_info(rental_owner_request_task_id, rental_owner_request_task_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_rental_owner_request_task ...'
  end
  # verify the required parameter 'rental_owner_request_task_id' is set
  if @api_client.config.client_side_validation && rental_owner_request_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'rental_owner_request_task_id' when calling TasksApi.update_rental_owner_request_task"
  end
  # verify the required parameter 'rental_owner_request_task_put_message' is set
  if @api_client.config.client_side_validation && rental_owner_request_task_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_owner_request_task_put_message' when calling TasksApi.update_rental_owner_request_task"
  end
  # resource path
  local_var_path = '/v1/tasks/rentalownerrequests/{rentalOwnerRequestTaskId}'.sub('{' + 'rentalOwnerRequestTaskId' + '}', CGI.escape(rental_owner_request_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(rental_owner_request_task_put_message)

  # return_type
  return_type = opts[:debug_return_type] || 'RentalOwnerRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.update_rental_owner_request_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#update_rental_owner_request_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_resource(resident_request_task_id, resident_request_task_put_message, opts = {}) ⇒ ResidentRequestTaskMessage

Update a resident request Update a resident request. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • resident_request_task_id (Integer)

    The resident request identifier.

  • resident_request_task_put_message (ResidentRequestTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1987
1988
1989
1990
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1987

def update_resource(resident_request_task_id, resident_request_task_put_message, opts = {})
  data, _status_code, _headers = update_resource_with_http_info(resident_request_task_id, resident_request_task_put_message, opts)
  data
end

#update_resource_with_http_info(resident_request_task_id, resident_request_task_put_message, opts = {}) ⇒ Array<(ResidentRequestTaskMessage, Integer, Hash)>

Update a resident request Update a resident request. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • resident_request_task_id (Integer)

    The resident request identifier.

  • resident_request_task_put_message (ResidentRequestTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ResidentRequestTaskMessage, Integer, Hash)>)

    ResidentRequestTaskMessage data, response status code and response headers



1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
# File 'lib/buildium-ruby/api/tasks_api.rb', line 1998

def update_resource_with_http_info(resident_request_task_id, resident_request_task_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_resource ...'
  end
  # verify the required parameter 'resident_request_task_id' is set
  if @api_client.config.client_side_validation && resident_request_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'resident_request_task_id' when calling TasksApi.update_resource"
  end
  # verify the required parameter 'resident_request_task_put_message' is set
  if @api_client.config.client_side_validation && resident_request_task_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'resident_request_task_put_message' when calling TasksApi.update_resource"
  end
  # resource path
  local_var_path = '/v1/tasks/residentrequests/{residentRequestTaskId}'.sub('{' + 'residentRequestTaskId' + '}', CGI.escape(resident_request_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(resident_request_task_put_message)

  # return_type
  return_type = opts[:debug_return_type] || 'ResidentRequestTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.update_resource",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#update_resource\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_task_category(task_category_id, task_category_put_message, opts = {}) ⇒ TaskCategoryMessage

Update a task category Updates a task category. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • task_category_id (Integer)

    The task category identifier.

  • task_category_put_message (TaskCategoryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2061
2062
2063
2064
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2061

def update_task_category(task_category_id, task_category_put_message, opts = {})
  data, _status_code, _headers = update_task_category_with_http_info(task_category_id, task_category_put_message, opts)
  data
end

#update_task_category_with_http_info(task_category_id, task_category_put_message, opts = {}) ⇒ Array<(TaskCategoryMessage, Integer, Hash)>

Update a task category Updates a task category. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • task_category_id (Integer)

    The task category identifier.

  • task_category_put_message (TaskCategoryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TaskCategoryMessage, Integer, Hash)>)

    TaskCategoryMessage data, response status code and response headers



2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2072

def update_task_category_with_http_info(task_category_id, task_category_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_task_category ...'
  end
  # verify the required parameter 'task_category_id' is set
  if @api_client.config.client_side_validation && task_category_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_category_id' when calling TasksApi.update_task_category"
  end
  # verify the required parameter 'task_category_put_message' is set
  if @api_client.config.client_side_validation && task_category_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'task_category_put_message' when calling TasksApi.update_task_category"
  end
  # resource path
  local_var_path = '/v1/tasks/categories/{taskCategoryId}'.sub('{' + 'taskCategoryId' + '}', CGI.escape(task_category_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(task_category_put_message)

  # return_type
  return_type = opts[:debug_return_type] || 'TaskCategoryMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.update_task_category",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#update_task_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_task_history(task_id, task_history_id, task_history_put_message, opts = {}) ⇒ TaskHistoryMessage

Update a task history Updates a specific task history record for a task. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • task_history_put_message (TaskHistoryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2136
2137
2138
2139
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2136

def update_task_history(task_id, task_history_id, task_history_put_message, opts = {})
  data, _status_code, _headers = update_task_history_with_http_info(task_id, task_history_id, task_history_put_message, opts)
  data
end

#update_task_history_with_http_info(task_id, task_history_id, task_history_put_message, opts = {}) ⇒ Array<(TaskHistoryMessage, Integer, Hash)>

Update a task history Updates a specific task history record for a task. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • task_history_put_message (TaskHistoryPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TaskHistoryMessage, Integer, Hash)>)

    TaskHistoryMessage data, response status code and response headers



2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2148

def update_task_history_with_http_info(task_id, task_history_id, task_history_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_task_history ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.update_task_history"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.update_task_history"
  end
  # verify the required parameter 'task_history_put_message' is set
  if @api_client.config.client_side_validation && task_history_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_put_message' when calling TasksApi.update_task_history"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(task_history_put_message)

  # return_type
  return_type = opts[:debug_return_type] || 'TaskHistoryMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.update_task_history",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#update_task_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_to_do_task(to_do_task_id, to_do_task_put_message, opts = {}) ⇒ ToDoTaskMessage

Update a to do task Updates a to do task <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - ‘View` `Edit`

Parameters:

  • to_do_task_id (Integer)

    The to do task identifier.

  • to_do_task_put_message (ToDoTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2215
2216
2217
2218
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2215

def update_to_do_task(to_do_task_id, to_do_task_put_message, opts = {})
  data, _status_code, _headers = update_to_do_task_with_http_info(to_do_task_id, to_do_task_put_message, opts)
  data
end

#update_to_do_task_with_http_info(to_do_task_id, to_do_task_put_message, opts = {}) ⇒ Array<(ToDoTaskMessage, Integer, Hash)>

Update a to do task Updates a to do task &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • to_do_task_id (Integer)

    The to do task identifier.

  • to_do_task_put_message (ToDoTaskPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ToDoTaskMessage, Integer, Hash)>)

    ToDoTaskMessage data, response status code and response headers



2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2226

def update_to_do_task_with_http_info(to_do_task_id, to_do_task_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.update_to_do_task ...'
  end
  # verify the required parameter 'to_do_task_id' is set
  if @api_client.config.client_side_validation && to_do_task_id.nil?
    fail ArgumentError, "Missing the required parameter 'to_do_task_id' when calling TasksApi.update_to_do_task"
  end
  # verify the required parameter 'to_do_task_put_message' is set
  if @api_client.config.client_side_validation && to_do_task_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'to_do_task_put_message' when calling TasksApi.update_to_do_task"
  end
  # resource path
  local_var_path = '/v1/tasks/todorequests/{toDoTaskId}'.sub('{' + 'toDoTaskId' + '}', CGI.escape(to_do_task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(to_do_task_put_message)

  # return_type
  return_type = opts[:debug_return_type] || 'ToDoTaskMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.update_to_do_task",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#update_to_do_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_task_history_file_request_async(task_id, task_history_id, task_history_file_upload_post_message, opts = {}) ⇒ FileUploadTicketMessage

Upload a task history file Uploads a file and associates it to the specified task history record. <br /><br />This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do’s. <br /><br />Uploading a file requires making two API requests. Each step is outlined below. <br /><br /><strong>Step 1 - Save file metadata</strong><br /> The first step in the file upload process is to submit the file metadata to ‘/v1/tasks/taskId/history/taskHistoryId/uploadrequests`. The response of this call will contain a URL and a collection of form data that will be used in step 2 to generate the request for the file binary upload. <br /><br /><strong>NOTE:</strong> The response data will expire after 5 minutes. The file metadata will not be saved in the Buildium system if step 2 of this process is not completed successfully. <br /><br /><strong>Step 2 - Upload the file binary</strong><br /> Uploading the file binary will require using the response from step 1 to form a POST request to the Buildium file provider. Follow these steps to create the request: <br /> 1. Form a POST request using the value of the `BucketUrl` property as the URL. <br /><br /> 2. Set the `Content-Type` header to `multipart/form-data`. <br /><br /> 3. Copy the fields from the `FormData` property to this request as form-data key/value pairs. <br /><strong>NOTE:</strong> These values must added to the request form-data in the order they were received in the response. <br /><br /> 4. Lastly create a form-data key named `file` and set the value to the file binary. <br /><strong>NOTE:</strong> This must be the last field in the form-data list. <br /><br />This image shows what the POST request should look like if you’re using Postman: <img src="file-upload-example.png" /><br /><br /> 5. Send the POST request! A successful request will return with a ‘204 - NO CONTENT` HTTP response code. For any failure responses, please refer to <a target="_blank" href="docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses">AWS documentation</a> on REST error responses. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Tasks &gt; Tasks</span> - `View` `Edit`

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • task_history_file_upload_post_message (TaskHistoryFileUploadPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2290
2291
2292
2293
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2290

def upload_task_history_file_request_async(task_id, task_history_id, task_history_file_upload_post_message, opts = {})
  data, _status_code, _headers = upload_task_history_file_request_async_with_http_info(task_id, task_history_id, task_history_file_upload_post_message, opts)
  data
end

#upload_task_history_file_request_async_with_http_info(task_id, task_history_id, task_history_file_upload_post_message, opts = {}) ⇒ Array<(FileUploadTicketMessage, Integer, Hash)>

Upload a task history file Uploads a file and associates it to the specified task history record. &lt;br /&gt;&lt;br /&gt;This endpoint can be used for any task type - contact requests, rental owner requests, resident requests or to do&#39;s. &lt;br /&gt;&lt;br /&gt;Uploading a file requires making two API requests. Each step is outlined below. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1 - Save file metadata&lt;/strong&gt;&lt;br /&gt; The first step in the file upload process is to submit the file metadata to &#x60;/v1/tasks/taskId/history/taskHistoryId/uploadrequests&#x60;. The response of this call will contain a URL and a collection of form data that will be used in step 2 to generate the request for the file binary upload. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The response data will expire after 5 minutes. The file metadata will not be saved in the Buildium system if step 2 of this process is not completed successfully. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2 - Upload the file binary&lt;/strong&gt;&lt;br /&gt; Uploading the file binary will require using the response from step 1 to form a POST request to the Buildium file provider. Follow these steps to create the request: &lt;br /&gt; 1. Form a POST request using the value of the &#x60;BucketUrl&#x60; property as the URL. &lt;br /&gt;&lt;br /&gt; 2. Set the &#x60;Content-Type&#x60; header to &#x60;multipart/form-data&#x60;. &lt;br /&gt;&lt;br /&gt; 3. Copy the fields from the &#x60;FormData&#x60; property to this request as form-data key/value pairs. &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; These values must added to the request form-data in the order they were received in the response. &lt;br /&gt;&lt;br /&gt; 4. Lastly create a form-data key named &#x60;file&#x60; and set the value to the file binary. &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This must be the last field in the form-data list. &lt;br /&gt;&lt;br /&gt;This image shows what the POST request should look like if you&#39;re using Postman: &lt;img src&#x3D;&quot;file-upload-example.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt; 5. Send the POST request! A successful request will return with a &#x60;204 - NO CONTENT&#x60; HTTP response code. For any failure responses, please refer to &lt;a target&#x3D;&quot;_blank&quot; href&#x3D;&quot;docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses&quot;&gt;AWS documentation&lt;/a&gt; on REST error responses. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Tasks &amp;gt; Tasks&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • task_id (Integer)
  • task_history_id (Integer)
  • task_history_file_upload_post_message (TaskHistoryFileUploadPostMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FileUploadTicketMessage, Integer, Hash)>)

    FileUploadTicketMessage data, response status code and response headers



2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
# File 'lib/buildium-ruby/api/tasks_api.rb', line 2302

def upload_task_history_file_request_async_with_http_info(task_id, task_history_id, task_history_file_upload_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TasksApi.upload_task_history_file_request_async ...'
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.upload_task_history_file_request_async"
  end
  # verify the required parameter 'task_history_id' is set
  if @api_client.config.client_side_validation && task_history_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_id' when calling TasksApi.upload_task_history_file_request_async"
  end
  # verify the required parameter 'task_history_file_upload_post_message' is set
  if @api_client.config.client_side_validation && task_history_file_upload_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'task_history_file_upload_post_message' when calling TasksApi.upload_task_history_file_request_async"
  end
  # resource path
  local_var_path = '/v1/tasks/{taskId}/history/{taskHistoryId}/files/uploadrequests'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s)).sub('{' + 'taskHistoryId' + '}', CGI.escape(task_history_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(task_history_file_upload_post_message)

  # return_type
  return_type = opts[:debug_return_type] || 'FileUploadTicketMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"TasksApi.upload_task_history_file_request_async",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#upload_task_history_file_request_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end