@@ -143,17 +143,32 @@ def batch_ai_tags_remove(file_ids, ai_tags)
143143 end
144144
145145 def copy ( source_file_path , destination_path )
146+ if source_file_path == '' || source_file_path . nil? || destination_path == '' || destination_path . nil?
147+ raise ArgumentError , 'parameters required'
148+ end
146149 url = "#{ constants . BASE_URL } /copy"
147150 payload = { 'sourceFilePath' : source_file_path , 'destinationPath' : destination_path }
148151 @req_obj . request ( 'post' , url , @req_obj . create_headers , payload )
149152 end
150153
151154 def move ( source_file_path , destination_path )
155+ if source_file_path == '' || source_file_path . nil? || destination_path == '' || destination_path . nil?
156+ raise ArgumentError , 'parameters required'
157+ end
152158 url = "#{ constants . BASE_URL } /move"
153159 payload = { 'sourceFilePath' : source_file_path , 'destinationPath' : destination_path }
154160 @req_obj . request ( 'post' , url , @req_obj . create_headers , payload )
155161 end
156162
163+ def rename ( file_path , new_file_name , **options )
164+ if file_path == '' || file_path . nil? || new_file_name == '' || new_file_name . nil?
165+ raise ArgumentError , 'parameters required'
166+ end
167+ url = "#{ constans . BASE_URL } /rename"
168+ payload = { 'filePath' : file_path , 'newFileName' : new_file_name } . merge ( request_formatter ( options ) )
169+ @req_obj . request ( 'put' , url , @req_obj . create_headers , payload )
170+ end
171+
157172 def validate_upload_options ( options )
158173
159174 # Validates upload value, checks if params are valid,
0 commit comments