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:, filename:) ⇒ DeleteFile

Returns a new instance of DeleteFile.



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

def initialize(collection_ref:, filename:)
  self.collection_ref = collection_ref
  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

Instance Method Details

#endpointObject



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

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

#verbObject



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

def verb
  :delete
end