Class: Reggora::Evault

Inherits:
Object
  • Object
show all
Defined in:
lib/reggora/Entity/Lender/evault.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Evault

Returns a new instance of Evault.



3
4
5
6
# File 'lib/reggora/Entity/Lender/evault.rb', line 3

def initialize(client)
  @model = 'evault'
  @client = client
end

Instance Method Details

#delete_document(params) ⇒ Object

delete a document from the evault



28
29
30
# File 'lib/reggora/Entity/Lender/evault.rb', line 28

def delete_document(params)
  @client.delete("/evault", params)
end

#document(evault_id, document_id) ⇒ Object

returns a file object specified by the evault ID and the document ID



13
14
15
# File 'lib/reggora/Entity/Lender/evault.rb', line 13

def document(evault_id, document_id)
  @client.get("/evault/#{evault_id}/#{document_id}")
end

#find(id) ⇒ Object

returns an eVault object



8
9
10
# File 'lib/reggora/Entity/Lender/evault.rb', line 8

def find(id)
  @client.get("/evault/#{id}")
end

#upload_document(upload_params) ⇒ Object

upload a document to an evault and returns the ID of the document



18
19
20
# File 'lib/reggora/Entity/Lender/evault.rb', line 18

def upload_document(upload_params)
  @client.post_file("/evault", upload_params)
end

#upload_p_s(upload_params) ⇒ Object

upload a P&S to an order and returns the ID of the P&S document



23
24
25
# File 'lib/reggora/Entity/Lender/evault.rb', line 23

def upload_p_s(upload_params)
  @client.post_file("/p_and_s", upload_params)
end