Module: Infusionsoft::Client::File

Included in:
Infusionsoft::Client
Defined in:
lib/infusionsoft/client/file.rb

Instance Method Summary collapse

Instance Method Details

#file_get(id) ⇒ Object

returns the Base64 encoded file contents



9
10
11
# File 'lib/infusionsoft/client/file.rb', line 9

def file_get(id)
  response = xmlrpc('FileService.getFile', id)
end

#file_rename(id, new_name) ⇒ Object



17
18
19
# File 'lib/infusionsoft/client/file.rb', line 17

def file_rename(id, new_name)
  response = xmlrpc('FileService.renameFile', id, new_name)
end

#file_replace(id, encoded_file_base64) ⇒ Object



21
22
23
# File 'lib/infusionsoft/client/file.rb', line 21

def file_replace(id, encoded_file_base64)
  response = xmlrpc('FileService.replaceFile', id, encoded_file_base64)
end

#file_upload(contact_id, file_name, encoded_file_base64) ⇒ Object



4
5
6
# File 'lib/infusionsoft/client/file.rb', line 4

def file_upload(contact_id, file_name, encoded_file_base64)
  response = xmlrpc('FileService.uploadFile', contact_id, file_name, encoded_file_base64)
end

#file_url(id) ⇒ Object



13
14
15
# File 'lib/infusionsoft/client/file.rb', line 13

def file_url(id)
  response = xmlrpc('FileService.getDownloadUrl', id)
end