Class: MojFileUploaderApiClient::DeleteFile

Inherits:
HttpClient
  • Object
show all
Defined in:
lib/mojfile_uploader_api_client/delete_file.rb

Constant Summary

Constants inherited from HttpClient

HttpClient::DEFAULT_OPTIONS

Instance Attribute Summary collapse

Attributes inherited from HttpClient

#response

Instance Method Summary collapse

Methods inherited from HttpClient

#call, configure, #options, #payload, #payload?

Constructor Details

#initialize(collection_ref:, folder: nil, filename:) ⇒ DeleteFile

Returns a new instance of DeleteFile.



5
6
7
8
9
# File 'lib/mojfile_uploader_api_client/delete_file.rb', line 5

def initialize(collection_ref:, folder: nil, filename:)
  self.collection_ref = collection_ref
  self.folder = folder
  self.filename = filename
end

Instance Attribute Details

#collection_refObject

Returns the value of attribute collection_ref.



3
4
5
# File 'lib/mojfile_uploader_api_client/delete_file.rb', line 3

def collection_ref
  @collection_ref
end

#filenameObject

Returns the value of attribute filename.



3
4
5
# File 'lib/mojfile_uploader_api_client/delete_file.rb', line 3

def filename
  @filename
end

#folderObject

Returns the value of attribute folder.



3
4
5
# File 'lib/mojfile_uploader_api_client/delete_file.rb', line 3

def folder
  @folder
end

Instance Method Details

#endpointObject



15
16
17
# File 'lib/mojfile_uploader_api_client/delete_file.rb', line 15

def endpoint
  [collection_ref, folder, filename].compact.join('/')
end

#verbObject



11
12
13
# File 'lib/mojfile_uploader_api_client/delete_file.rb', line 11

def verb
  :delete
end