Class: Veryfi::Client
- Inherits:
-
Object
- Object
- Veryfi::Client
- Defined in:
- lib/veryfi/client.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #api_url ⇒ Object
- #document ⇒ Object
- #document_tag ⇒ Object
-
#initialize(client_id:, client_secret:, username:, api_key:, base_url: "https://api.veryfi.com/api/", api_version: "v8", timeout: 20) ⇒ Client
constructor
A new instance of Client.
- #line_item ⇒ Object
- #tag ⇒ Object
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
#request ⇒ Object (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_url ⇒ Object
35 36 37 |
# File 'lib/veryfi/client.rb', line 35 def api_url request.api_url end |
#document ⇒ Object
19 20 21 |
# File 'lib/veryfi/client.rb', line 19 def document @_document ||= Veryfi::Api::Document.new(request) end |
#document_tag ⇒ Object
31 32 33 |
# File 'lib/veryfi/client.rb', line 31 def document_tag @_document_tag ||= Veryfi::Api::DocumentTag.new(request) end |