Class: DotloopApi::EndPoints::Document
- Defined in:
- lib/dotloop_api/end_points/document.rb
Instance Attribute Summary collapse
-
#folder_id ⇒ Object
Returns the value of attribute folder_id.
-
#loop_id ⇒ Object
Returns the value of attribute loop_id.
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
Instance Method Summary collapse
- #download(id:) ⇒ Object
-
#initialize(client:, profile_id: nil, loop_id: nil, folder_id: nil) ⇒ Document
constructor
A new instance of Document.
- #path ⇒ Object
Methods inherited from Base
#all, #create, #delete, #find, #save, #single_path
Methods included from ModelBuilder
#build_details, #build_documents, #build_model
Constructor Details
#initialize(client:, profile_id: nil, loop_id: nil, folder_id: nil) ⇒ Document
Returns a new instance of Document.
8 9 10 11 12 13 |
# File 'lib/dotloop_api/end_points/document.rb', line 8 def initialize(client:, profile_id: nil, loop_id: nil, folder_id: nil) @profile_id = profile_id @loop_id = loop_id @folder_id = folder_id super(client: client, path: path, type: DotloopApi::Models::Profile::Loop::Folder::Document) end |
Instance Attribute Details
#folder_id ⇒ Object
Returns the value of attribute folder_id.
4 5 6 |
# File 'lib/dotloop_api/end_points/document.rb', line 4 def folder_id @folder_id end |
#loop_id ⇒ Object
Returns the value of attribute loop_id.
4 5 6 |
# File 'lib/dotloop_api/end_points/document.rb', line 4 def loop_id @loop_id end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
4 5 6 |
# File 'lib/dotloop_api/end_points/document.rb', line 4 def profile_id @profile_id end |
Instance Method Details
#download(id:) ⇒ Object
19 20 21 |
# File 'lib/dotloop_api/end_points/document.rb', line 19 def download(id:) @client.download(single_path(id)) end |
#path ⇒ Object
15 16 17 |
# File 'lib/dotloop_api/end_points/document.rb', line 15 def path "/profile/#{@profile_id}/loop/#{@loop_id}/folder/#{@folder_id}/document" end |