Class: Efolder::Service
- Inherits:
-
Object
- Object
- Efolder::Service
- Defined in:
- lib/efolder/service.rb
Overview
Veteran Facing eFolder
This service provides the veteran with methods to both view the contents of their eFolder, and also download the files contained therein.
Instance Method Summary collapse
- #get_document(document_id) ⇒ Object
-
#initialize(user) ⇒ Service
constructor
A new instance of Service.
- #list_documents ⇒ Object
Constructor Details
Instance Method Details
#get_document(document_id) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/efolder/service.rb', line 28 def get_document(document_id) verify_document_in_folder(document_id) @client.send_request( VBMS::Requests::GetDocumentContent.new(document_id) ).content end |
#list_documents ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/efolder/service.rb', line 18 def list_documents vbms_docs.map do |document| if @bgs_doc_uuids.include?(document[:document_id].delete('{}')) document.marshal_dump.slice( :document_id, :doc_type, :type_description, :received_at ) end end.compact end |