Method: RubyBox::Folder#copy_to

Defined in:
lib/ruby-box/folder.rb

#copy_to(destination, name = nil) ⇒ Object

see developers.box.com/docs/#folders-copy-a-folder for a description of the behavior



72
73
74
75
76
77
# File 'lib/ruby-box/folder.rb', line 72

def copy_to(destination, name=nil)
  parent = {'parent' => {'id' => destination.id}}
  parent.merge!('name' => name) if name

  RubyBox::Folder.new(@session, post(folder_method(:copy), parent))
end