Sha256: a9e30bcdee00fac4d744e11d4c44025182f18b6eabf4568d092611a3ba704eae

Contents?: true

Size: 678 Bytes

Versions: 4

Compression:

Stored size: 678 Bytes

Contents

module Onfido
  class Check < Resource
    def create(applicant_id, payload)
      post(
        url: url_for("applicants/#{applicant_id}/checks"),
        payload: payload
      )
    end

    def find(applicant_id, check_id, expand: nil)
      querystring = "&expand=#{expand}" if expand
      get(url: url_for("applicants/#{applicant_id}/checks/#{check_id}?" \
                       "#{querystring}"))
    end

    def all(applicant_id, page: 1, per_page: 20, expand: nil)
      querystring = "page=#{page}&per_page=#{per_page}"
      querystring += "&expand=#{expand}" if expand
      get(url: url_for("applicants/#{applicant_id}/checks?#{querystring}"))
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
onfido-0.7.1 lib/onfido/resources/check.rb
onfido-0.7.0 lib/onfido/resources/check.rb
onfido-0.6.1 lib/onfido/resources/check.rb
onfido-0.6.0 lib/onfido/resources/check.rb