Class: Veryfi::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_id:, client_secret:, username:, api_key:, base_url: "https://api.veryfi.com/api/", api_version: "v8", timeout: 20) ⇒ Client

Returns a new instance of Client.


7
8
9
10
11
12
13
14
15
16
17
# File 'lib/veryfi/client.rb', line 7

def initialize(
  client_id:,
  client_secret:,
  username:,
  api_key:,
  base_url: "https://api.veryfi.com/api/",
  api_version: "v8",
  timeout: 20
)
  @request = Veryfi::Request.new(client_id, client_secret, username, api_key, base_url, api_version, timeout)
end

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.


5
6
7
# File 'lib/veryfi/client.rb', line 5

def request
  @request
end

Instance Method Details

#api_urlObject


35
36
37
# File 'lib/veryfi/client.rb', line 35

def api_url
  request.api_url
end

#documentObject


19
20
21
# File 'lib/veryfi/client.rb', line 19

def document
  @_document ||= Veryfi::Api::Document.new(request)
end

#document_tagObject


31
32
33
# File 'lib/veryfi/client.rb', line 31

def document_tag
  @_document_tag ||= Veryfi::Api::DocumentTag.new(request)
end

#line_itemObject


23
24
25
# File 'lib/veryfi/client.rb', line 23

def line_item
  @_line_item ||= Veryfi::Api::LineItem.new(request)
end

#tagObject


27
28
29
# File 'lib/veryfi/client.rb', line 27

def tag
  @_tag ||= Veryfi::Api::Tag.new(request)
end