Class: Veryfi::Api::DocumentTag

Inherits:
Object
  • Object
show all
Defined in:
lib/veryfi/api/document_tag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#requestObject (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