Class: Veryfi::Api::DocumentTag
- Inherits:
-
Object
- Object
- Veryfi::Api::DocumentTag
- Defined in:
- lib/veryfi/api/document_tag.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #add(document_id, params) ⇒ Object
- #all(document_id, params = {}) ⇒ Object
- #delete(document_id, id) ⇒ Object
- #delete_all(document_id) ⇒ Object
-
#initialize(request) ⇒ DocumentTag
constructor
A new instance of DocumentTag.
Constructor Details
#initialize(request) ⇒ DocumentTag
Returns a new instance of DocumentTag.
8 9 10 |
# File 'lib/veryfi/api/document_tag.rb', line 8 def initialize(request) @request = request end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
6 7 8 |
# File 'lib/veryfi/api/document_tag.rb', line 6 def request @request end |
Instance Method Details
#add(document_id, params) ⇒ Object
18 19 20 |
# File 'lib/veryfi/api/document_tag.rb', line 18 def add(document_id, params) request.put("/partner/documents/#{document_id}/tags/", params) end |
#all(document_id, params = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/veryfi/api/document_tag.rb', line 12 def all(document_id, params = {}) response = request.get("/partner/documents/#{document_id}/tags/", params) response["tags"] end |
#delete(document_id, id) ⇒ Object
26 27 28 |
# File 'lib/veryfi/api/document_tag.rb', line 26 def delete(document_id, id) request.delete("/partner/documents/#{document_id}/tags/#{id}") end |
#delete_all(document_id) ⇒ Object
22 23 24 |
# File 'lib/veryfi/api/document_tag.rb', line 22 def delete_all(document_id) request.delete("/partner/documents/#{document_id}/tags/") end |