Class: Hubspot::Files::FoldersApi
- Inherits:
-
Object
- Object
- Hubspot::Files::FoldersApi
- Defined in:
- lib/hubspot/codegen/files/api/folders_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#archive(folder_id, opts = {}) ⇒ nil
Delete folder by ID Delete folder by ID.
-
#archive_by_path(folder_path, opts = {}) ⇒ nil
Delete folder by path Delete a folder, identified by its path.
-
#archive_by_path_with_http_info(folder_path, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete folder by path Delete a folder, identified by its path.
-
#archive_with_http_info(folder_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete folder by ID Delete folder by ID.
-
#check_update_status(task_id, opts = {}) ⇒ FolderActionResponse
Check folder update status Check status of folder update.
-
#check_update_status_with_http_info(task_id, opts = {}) ⇒ Array<(FolderActionResponse, Integer, Hash)>
Check folder update status Check status of folder update.
-
#create(folder_input, opts = {}) ⇒ Folder
Create folder Creates a folder.
-
#create_with_http_info(folder_input, opts = {}) ⇒ Array<(Folder, Integer, Hash)>
Create folder Creates a folder.
-
#do_search(opts = {}) ⇒ CollectionResponseFolder
Search folders Search for folders.
-
#do_search_with_http_info(opts = {}) ⇒ Array<(CollectionResponseFolder, Integer, Hash)>
Search folders Search for folders.
-
#get_by_id(folder_id, opts = {}) ⇒ Folder
Retrieve folder by ID Retrieve a folder by its ID.
-
#get_by_id_with_http_info(folder_id, opts = {}) ⇒ Array<(Folder, Integer, Hash)>
Retrieve folder by ID Retrieve a folder by its ID.
-
#get_by_path(folder_path, opts = {}) ⇒ Folder
Retrieve folder by path Retrieve a folder, identified by its path.
-
#get_by_path_with_http_info(folder_path, opts = {}) ⇒ Array<(Folder, Integer, Hash)>
Retrieve folder by path Retrieve a folder, identified by its path.
-
#initialize(api_client = ApiClient.default) ⇒ FoldersApi
constructor
A new instance of FoldersApi.
-
#update_properties(folder_id, folder_update_input, opts = {}) ⇒ Folder
Update folder properties by folder ID Update a folder’s properties, identified by folder ID.
-
#update_properties_recursively(folder_update_input_with_id, opts = {}) ⇒ FolderUpdateTaskLocator
Update folder properties Update properties of folder by given ID.
-
#update_properties_recursively_with_http_info(folder_update_input_with_id, opts = {}) ⇒ Array<(FolderUpdateTaskLocator, Integer, Hash)>
Update folder properties Update properties of folder by given ID.
-
#update_properties_with_http_info(folder_id, folder_update_input, opts = {}) ⇒ Array<(Folder, Integer, Hash)>
Update folder properties by folder ID Update a folder's properties, identified by folder ID.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FoldersApi
20 21 22 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 20 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
18 19 20 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 18 def api_client @api_client end |
Instance Method Details
#archive(folder_id, opts = {}) ⇒ nil
Delete folder by ID Delete folder by ID.
28 29 30 31 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 28 def archive(folder_id, opts = {}) archive_with_http_info(folder_id, opts) nil end |
#archive_by_path(folder_path, opts = {}) ⇒ nil
Delete folder by path Delete a folder, identified by its path.
96 97 98 99 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 96 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 by path Delete a folder, identified by its path.
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 157 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 106 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] || ['oauth2'] = 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, ) 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 by ID Delete folder by ID.
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 89 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 38 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] || ['oauth2'] = 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, ) 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.
164 165 166 167 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 164 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.
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 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 174 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] || ['oauth2'] = 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, ) 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.
227 228 229 230 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 227 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.
237 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 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 237 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] || ['oauth2'] = 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, ) 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.
311 312 313 314 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 311 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.
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 392 393 394 395 396 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 337 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[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil? query_params[:'idLte'] = opts[:'id_lte'] if !opts[:'id_lte'].nil? query_params[:'idGte'] = opts[:'id_gte'] if !opts[:'id_gte'].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[:'parentFolderIds'] = @api_client.build_collection_param(opts[:'parent_folder_ids'], :multi) if !opts[:'parent_folder_ids'].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] || ['oauth2'] = 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, ) 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
Retrieve folder by ID Retrieve a folder by its ID.
404 405 406 407 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 404 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)>
Retrieve folder by ID Retrieve a folder by its ID.
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 463 464 465 466 467 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 415 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] || ['oauth2'] = 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, ) 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
Retrieve folder by path Retrieve a folder, identified by its path.
475 476 477 478 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 475 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)>
Retrieve folder by path Retrieve a folder, identified by its path.
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 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 486 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] || ['oauth2'] = 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, ) 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_id, folder_update_input, opts = {}) ⇒ Folder
Update folder properties by folder ID Update a folder’s properties, identified by folder ID.
546 547 548 549 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 546 def update_properties(folder_id, folder_update_input, opts = {}) data, _status_code, _headers = update_properties_with_http_info(folder_id, folder_update_input, opts) data end |
#update_properties_recursively(folder_update_input_with_id, 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.
624 625 626 627 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 624 def update_properties_recursively(folder_update_input_with_id, opts = {}) data, _status_code, _headers = update_properties_recursively_with_http_info(folder_update_input_with_id, opts) data end |
#update_properties_recursively_with_http_info(folder_update_input_with_id, 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's children as well.
634 635 636 637 638 639 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 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 634 def update_properties_recursively_with_http_info(folder_update_input_with_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FoldersApi.update_properties_recursively ...' end # verify the required parameter 'folder_update_input_with_id' is set if @api_client.config.client_side_validation && folder_update_input_with_id.nil? fail ArgumentError, "Missing the required parameter 'folder_update_input_with_id' when calling FoldersApi.update_properties_recursively" 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_with_id) # return_type return_type = opts[:debug_return_type] || 'FolderUpdateTaskLocator' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"FoldersApi.update_properties_recursively", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FoldersApi#update_properties_recursively\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_properties_with_http_info(folder_id, folder_update_input, opts = {}) ⇒ Array<(Folder, Integer, Hash)>
Update folder properties by folder ID Update a folder's properties, identified by folder ID.
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 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/hubspot/codegen/files/api/folders_api.rb', line 557 def update_properties_with_http_info(folder_id, 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_id' is set if @api_client.config.client_side_validation && folder_id.nil? fail ArgumentError, "Missing the required parameter 'folder_id' when calling FoldersApi.update_properties" 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.update_properties, must conform to the pattern #{pattern}." 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/{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(['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] || 'Folder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = 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(:PATCH, local_var_path, ) 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 |