Class: Doccy::Documents
- Inherits:
-
Object
- Object
- Doccy::Documents
- Defined in:
- lib/doccy/documents.rb
Class Method Summary collapse
- .create(auth_token, template_id, document_params) ⇒ Object
- .download(auth_token, template_id, document_id) ⇒ Object
- .get(auth_token, template_id, document_id) ⇒ Object
Class Method Details
.create(auth_token, template_id, document_params) ⇒ Object
5 6 7 8 9 |
# File 'lib/doccy/documents.rb', line 5 def self.create(auth_token, template_id, document_params) = { query: { auth_token: auth_token, document: document_params} } response = HTTParty.post("#{Doccy::Config.url}/templates/#{template_id}/documents.json", ) end |
.download(auth_token, template_id, document_id) ⇒ Object
17 18 19 20 21 |
# File 'lib/doccy/documents.rb', line 17 def self.download(auth_token, template_id, document_id) = { query: { auth_token: auth_token} } response = HTTParty.get("#{Doccy::Config.url}/templates/#{template_id}/documents/#{document_id}/download.json", ) end |
.get(auth_token, template_id, document_id) ⇒ Object
11 12 13 14 15 |
# File 'lib/doccy/documents.rb', line 11 def self.get(auth_token, template_id, document_id) = { query: { auth_token: auth_token} } response = HTTParty.get("#{Doccy::Config.url}/templates/#{template_id}/documents/#{document_id}.json", ) end |