Sha256: b7bb9dda508d7e976e9564bd24c1b5d646a3c30ebca898e70d7225447d9b87db

Contents?: true

Size: 1017 Bytes

Versions: 8

Compression:

Stored size: 1017 Bytes

Contents

# frozen_string_literal: true

module Onfido
  class API
    def initialize(api_key:, region:, **extra_options)
      @options = Onfido::Options.new(api_key: api_key, region: region, **extra_options)
    end

    def applicant
      @applicant ||= Onfido::Applicant.new(options)
    end

    def check
      @check ||= Onfido::Check.new(options)
    end

    def document
      @document ||= Onfido::Document.new(options)
    end

    def live_photo
      @live_photo ||= Onfido::LivePhoto.new(options)
    end

    def live_video
      @live_video ||= Onfido::LiveVideo.new(options)
    end

    def report
      @report ||= Onfido::Report.new(options)
    end

    def sdk_token
      @sdk_token ||= Onfido::SdkToken.new(options)
    end

    def webhook
      @webhook ||= Onfido::Webhook.new(options)
    end

    def address
      @address ||= Onfido::Address.new(options)
    end

    def extraction
      @extraction ||= Onfido::Extraction.new(options)
    end

    private

    attr_reader :options
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
onfido-2.4.0 lib/onfido/api.rb
onfido-2.3.0 lib/onfido/api.rb
onfido-2.2.0 lib/onfido/api.rb
onfido-2.1.1 lib/onfido/api.rb
onfido-2.1.0 lib/onfido/api.rb
onfido-2.0.2 lib/onfido/api.rb
onfido-2.0.1 lib/onfido/api.rb
onfido-2.0.0 lib/onfido/api.rb