Method: FileboundClient::Endpoints::DocumentBinaryData#update_binary_data

Defined in:
lib/filebound_client/endpoints/document_binary_data.rb

#update_binary_data(document_id, extension, binary_data) ⇒ Hash

Updates binary data

Parameters:

  • document_id (int)

    the document key

  • extension (String)

    the file extension

  • binary_data (String)

    the Base64 encoded binary data to update

Returns:

  • (Hash)

    the updated document

Raises:

  • (FileboundClientException)


32
33
34
35
36
37
# File 'lib/filebound_client/endpoints/document_binary_data.rb', line 32

def update_binary_data(document_id, extension, binary_data)
  raise FileboundClientException.new('extension is required', 0) if extension.blank?
  raise FileboundClientException.new('binary_data is required', 0) if binary_data.blank?
  post("/documentBinaryData/#{document_id}", nil, id: document_id, extension: extension,
                                                  documentToUpload: binary_data)
end