Class: Hubspot::Files::Files::FoldersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot/codegen/files/files/api/folders_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FoldersApi

Returns a new instance of FoldersApi.



21
22
23
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 21

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



19
20
21
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 19

def api_client
  @api_client
end

Instance Method Details

#archive(folder_id, opts = {}) ⇒ nil

Delete folder. Delete folder by ID.

Parameters:

  • folder_id (String)

    ID of folder to delete.

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

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 29

def archive(folder_id, opts = {})
  archive_with_http_info(folder_id, opts)
  nil
end

#archive_by_path(folder_path, opts = {}) ⇒ nil

Delete folder. Delete folder by path.

Parameters:

  • folder_path (String)

    Path of folder to delete

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

    the optional parameters

Returns:

  • (nil)


97
98
99
100
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 97

def archive_by_path(folder_path, opts = {})
  archive_by_path_with_http_info(folder_path, opts)
  nil
end

#archive_by_path_with_http_info(folder_path, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete folder. Delete folder by path.

Parameters:

  • folder_path (String)

    Path of folder to delete

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
157
158
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 107

def archive_by_path_with_http_info(folder_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.archive_by_path ...'
  end
  # verify the required parameter 'folder_path' is set
  if @api_client.config.client_side_validation && folder_path.nil?
    fail ArgumentError, "Missing the required parameter 'folder_path' when calling FoldersApi.archive_by_path"
  end
  pattern = Regexp.new(/.+/)
  if @api_client.config.client_side_validation && folder_path !~ pattern
    fail ArgumentError, "invalid value for 'folder_path' when calling FoldersApi.archive_by_path, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/files/v3/folders/{folderPath}'.sub('{' + 'folderPath' + '}', CGI.escape(folder_path.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(['*/*'])

  # 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] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.archive_by_path",
    :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: FoldersApi#archive_by_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#archive_with_http_info(folder_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete folder. Delete folder by ID.

Parameters:

  • folder_id (String)

    ID of folder to delete.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
89
90
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 39

def archive_with_http_info(folder_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.archive ...'
  end
  # verify the required parameter 'folder_id' is set
  if @api_client.config.client_side_validation && folder_id.nil?
    fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.archive"
  end
  pattern = Regexp.new(/\d+/)
  if @api_client.config.client_side_validation && folder_id !~ pattern
    fail ArgumentError, "invalid value for 'folder_id' when calling FoldersApi.archive, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/files/v3/folders/{folderId}'.sub('{' + 'folderId' + '}', CGI.escape(folder_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(['*/*'])

  # 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] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.archive",
    :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: FoldersApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#check_update_status(task_id, opts = {}) ⇒ FolderActionResponse

Check folder update status. Check status of folder update. Folder updates happen asynchronously.

Parameters:

  • task_id (String)

    Task ID of folder update

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

    the optional parameters

Returns:



165
166
167
168
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 165

def check_update_status(task_id, opts = {})
  data, _status_code, _headers = check_update_status_with_http_info(task_id, opts)
  data
end

#check_update_status_with_http_info(task_id, opts = {}) ⇒ Array<(FolderActionResponse, Integer, Hash)>

Check folder update status. Check status of folder update. Folder updates happen asynchronously.

Parameters:

  • task_id (String)

    Task ID of folder update

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

    the optional parameters

Returns:

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

    FolderActionResponse data, response status code and response headers



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
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 175

def check_update_status_with_http_info(task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.check_update_status ...'
  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 FoldersApi.check_update_status"
  end
  # resource path
  local_var_path = '/files/v3/folders/update/async/tasks/{taskId}/status'.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] || 'FolderActionResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.check_update_status",
    :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: FoldersApi#check_update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create(folder_input, opts = {}) ⇒ Folder

Create folder. Creates a folder.

Parameters:

  • folder_input (FolderInput)

    Folder creation options

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

    the optional parameters

Returns:



228
229
230
231
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 228

def create(folder_input, opts = {})
  data, _status_code, _headers = create_with_http_info(folder_input, opts)
  data
end

#create_with_http_info(folder_input, opts = {}) ⇒ Array<(Folder, Integer, Hash)>

Create folder. Creates a folder.

Parameters:

  • folder_input (FolderInput)

    Folder creation options

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

    the optional parameters

Returns:

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

    Folder data, response status code and response headers



238
239
240
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
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 238

def create_with_http_info(folder_input, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.create ...'
  end
  # verify the required parameter 'folder_input' is set
  if @api_client.config.client_side_validation && folder_input.nil?
    fail ArgumentError, "Missing the required parameter 'folder_input' when calling FoldersApi.create"
  end
  # resource path
  local_var_path = '/files/v3/folders'

  # 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(folder_input)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.create",
    :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: FoldersApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#do_search(opts = {}) ⇒ CollectionResponseFolder

Search folders Search for folders. Does not contain hidden or archived folders.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :properties (Array<String>)

    Properties that should be included in the returned folders.

  • :after (String)

    The maximum offset of items for a given search is 10000. Narrow your search down if you are reaching this limit.

  • :before (String)
  • :limit (Integer)

    Limit of results to return. Max limit is 100.

  • :sort (Array<String>)

    Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending.

  • :id (String)

    Search folder by given ID.

  • :created_at (Time)

    Search for folders with the given creation timestamp.

  • :created_at_lte (Time)
  • :created_at_gte (Time)
  • :updated_at (Time)

    Search for folder at given update timestamp.

  • :updated_at_lte (Time)
  • :updated_at_gte (Time)
  • :name (String)

    Search for folders containing the specified name.

  • :path (String)

    Search for folders by path.

  • :parent_folder_id (Integer)

    Search for folders with the given parent folder ID.

Returns:



310
311
312
313
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 310

def do_search(opts = {})
  data, _status_code, _headers = do_search_with_http_info(opts)
  data
end

#do_search_with_http_info(opts = {}) ⇒ Array<(CollectionResponseFolder, Integer, Hash)>

Search folders Search for folders. Does not contain hidden or archived folders.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :properties (Array<String>)

    Properties that should be included in the returned folders.

  • :after (String)

    The maximum offset of items for a given search is 10000. Narrow your search down if you are reaching this limit.

  • :before (String)
  • :limit (Integer)

    Limit of results to return. Max limit is 100.

  • :sort (Array<String>)

    Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending.

  • :id (String)

    Search folder by given ID.

  • :created_at (Time)

    Search for folders with the given creation timestamp.

  • :created_at_lte (Time)
  • :created_at_gte (Time)
  • :updated_at (Time)

    Search for folder at given update timestamp.

  • :updated_at_lte (Time)
  • :updated_at_gte (Time)
  • :name (String)

    Search for folders containing the specified name.

  • :path (String)

    Search for folders by path.

  • :parent_folder_id (Integer)

    Search for folders with the given parent folder ID.

Returns:

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

    CollectionResponseFolder data, response status code and response headers



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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 334

def do_search_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.do_search ...'
  end
  # resource path
  local_var_path = '/files/v3/folders/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :csv) if !opts[:'properties'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
  query_params[:'createdAtLte'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil?
  query_params[:'createdAtGte'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil?
  query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
  query_params[:'updatedAtLte'] = opts[:'updated_at_lte'] if !opts[:'updated_at_lte'].nil?
  query_params[:'updatedAtGte'] = opts[:'updated_at_gte'] if !opts[:'updated_at_gte'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
  query_params[:'parentFolderId'] = opts[:'parent_folder_id'] if !opts[:'parent_folder_id'].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] || 'CollectionResponseFolder'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.do_search",
    :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: FoldersApi#do_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_by_id(folder_id, opts = {}) ⇒ Folder

Get folder Get folder by ID

Parameters:

  • folder_id (String)

    ID of desired folder

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

    the optional parameters

Options Hash (opts):

  • :properties (Array<String>)

    Properties to set on returned folder.

Returns:



399
400
401
402
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 399

def get_by_id(folder_id, opts = {})
  data, _status_code, _headers = get_by_id_with_http_info(folder_id, opts)
  data
end

#get_by_id_with_http_info(folder_id, opts = {}) ⇒ Array<(Folder, Integer, Hash)>

Get folder Get folder by ID

Parameters:

  • folder_id (String)

    ID of desired folder

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

    the optional parameters

Options Hash (opts):

  • :properties (Array<String>)

    Properties to set on returned folder.

Returns:

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

    Folder data, response status code and response headers



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
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 410

def get_by_id_with_http_info(folder_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.get_by_id ...'
  end
  # verify the required parameter 'folder_id' is set
  if @api_client.config.client_side_validation && folder_id.nil?
    fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.get_by_id"
  end
  pattern = Regexp.new(/\d+/)
  if @api_client.config.client_side_validation && folder_id !~ pattern
    fail ArgumentError, "invalid value for 'folder_id' when calling FoldersApi.get_by_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/files/v3/folders/{folderId}'.sub('{' + 'folderId' + '}', CGI.escape(folder_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :csv) if !opts[:'properties'].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] || 'Folder'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.get_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: FoldersApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_by_path(folder_path, opts = {}) ⇒ Folder

Get folder. Get folder by path.

Parameters:

  • folder_path (String)

    Path of desired folder.

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

    the optional parameters

Options Hash (opts):

  • :properties (Array<String>)

    Properties to set on returned folder.

Returns:



470
471
472
473
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 470

def get_by_path(folder_path, opts = {})
  data, _status_code, _headers = get_by_path_with_http_info(folder_path, opts)
  data
end

#get_by_path_with_http_info(folder_path, opts = {}) ⇒ Array<(Folder, Integer, Hash)>

Get folder. Get folder by path.

Parameters:

  • folder_path (String)

    Path of desired folder.

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

    the optional parameters

Options Hash (opts):

  • :properties (Array<String>)

    Properties to set on returned folder.

Returns:

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

    Folder data, response status code and response headers



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
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 481

def get_by_path_with_http_info(folder_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.get_by_path ...'
  end
  # verify the required parameter 'folder_path' is set
  if @api_client.config.client_side_validation && folder_path.nil?
    fail ArgumentError, "Missing the required parameter 'folder_path' when calling FoldersApi.get_by_path"
  end
  pattern = Regexp.new(/.+/)
  if @api_client.config.client_side_validation && folder_path !~ pattern
    fail ArgumentError, "invalid value for 'folder_path' when calling FoldersApi.get_by_path, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/files/v3/folders/{folderPath}'.sub('{' + 'folderPath' + '}', CGI.escape(folder_path.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :csv) if !opts[:'properties'].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] || 'Folder'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.get_by_path",
    :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: FoldersApi#get_by_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_properties(folder_update_input, opts = {}) ⇒ FolderUpdateTaskLocator

Update folder properties Update properties of folder by given ID. This action happens asynchronously and will update all of the folder’s children as well.

Parameters:

  • folder_update_input (FolderUpdateInput)

    Properties to change in the folder

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

    the optional parameters

Returns:



540
541
542
543
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 540

def update_properties(folder_update_input, opts = {})
  data, _status_code, _headers = update_properties_with_http_info(folder_update_input, opts)
  data
end

#update_properties_with_http_info(folder_update_input, opts = {}) ⇒ Array<(FolderUpdateTaskLocator, Integer, Hash)>

Update folder properties Update properties of folder by given ID. This action happens asynchronously and will update all of the folder&#39;s children as well.

Parameters:

  • folder_update_input (FolderUpdateInput)

    Properties to change in the folder

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

    the optional parameters

Returns:

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

    FolderUpdateTaskLocator data, response status code and response headers



550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
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
# File 'lib/hubspot/codegen/files/files/api/folders_api.rb', line 550

def update_properties_with_http_info(folder_update_input, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FoldersApi.update_properties ...'
  end
  # verify the required parameter 'folder_update_input' is set
  if @api_client.config.client_side_validation && folder_update_input.nil?
    fail ArgumentError, "Missing the required parameter 'folder_update_input' when calling FoldersApi.update_properties"
  end
  # resource path
  local_var_path = '/files/v3/folders/update/async'

  # 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(folder_update_input)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']

  new_options = opts.merge(
    :operation => :"FoldersApi.update_properties",
    :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: FoldersApi#update_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end