Sha256: 8001619ec572c48b9c6d1232ca587cf6a2c4b3151b441599dfed744ca3108ede

Contents?: true

Size: 780 Bytes

Versions: 5

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

module Veryfi
  class Client
    attr_reader :request

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

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

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

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

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

    def api_url
      request.api_url
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
veryfi-0.1.4 lib/veryfi/client.rb
veryfi-0.1.3 lib/veryfi/client.rb
veryfi-0.1.2 lib/veryfi/client.rb
veryfi-0.1.1 lib/veryfi/client.rb
veryfi-0.1.0 lib/veryfi/client.rb