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.
9 10 11 12 13 14 |
# File 'lib/dotloop_api/end_points/document.rb', line 9 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.
6 7 8 |
# File 'lib/dotloop_api/end_points/document.rb', line 6 def folder_id @folder_id end |
#loop_id ⇒ Object
Returns the value of attribute loop_id.
5 6 7 |
# File 'lib/dotloop_api/end_points/document.rb', line 5 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
20 21 22 |
# File 'lib/dotloop_api/end_points/document.rb', line 20 def download(id:) @client.download(single_path(id)) end |
#path ⇒ Object
16 17 18 |
# File 'lib/dotloop_api/end_points/document.rb', line 16 def path "/profile/#{@profile_id}/loop/#{@loop_id}/folder/#{@folder_id}/document" end |