Class: Veryfi::Api::Tag
- Inherits:
-
Object
- Object
- Veryfi::Api::Tag
- Defined in:
- lib/veryfi/api/tag.rb
Overview
Global tag catalog (/partner/tags/).
Note: This endpoint is not present in every Veryfi API version. For
managing tags on a specific document use DocumentTag
(or the .tags / .add_tag / .add_tags / .delete_tag methods
on each processed-document resource — see TagOperations).
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#all(params = {}) ⇒ Array<Veryfi::Resource>
List every tag known to the account.
-
#delete(id) ⇒ Veryfi::Resource
Delete a tag by id.
-
#initialize(request) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(request) ⇒ Tag
Returns a new instance of Tag.
14 15 16 |
# File 'lib/veryfi/api/tag.rb', line 14 def initialize(request) @request = request end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
12 13 14 |
# File 'lib/veryfi/api/tag.rb', line 12 def request @request end |
Instance Method Details
#all(params = {}) ⇒ Array<Veryfi::Resource>
List every tag known to the account.
22 23 24 25 26 |
# File 'lib/veryfi/api/tag.rb', line 22 def all(params = {}) response = request.get("/partner/tags/", params) response["tags"] end |
#delete(id) ⇒ Veryfi::Resource
Delete a tag by id.
32 33 34 |
# File 'lib/veryfi/api/tag.rb', line 32 def delete(id) request.delete("/partner/tags/#{id}") end |