Sha256: 4b649136637137020e258b17457749d5a10c3301a8e62b311be2d0c3e4e030df
Contents?: true
Size: 617 Bytes
Versions: 3
Compression:
Stored size: 617 Bytes
Contents
module Onfido class Document < Resource # with open-uri the file can be a link or an actual file def create(applicant_id:, file:, type:, **payload) validate_file!(file) payload[:applicant_id] = applicant_id payload[:file] = file payload[:type] = type post(path: 'documents', payload: payload) end def find(document_id) get(path: "documents/#{document_id}") end def download(document_id) get(path: "documents/#{document_id}/download") end def all(applicant_id) get(path: "documents?applicant_id=#{applicant_id}") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
onfido-1.1.1 | lib/onfido/resources/document.rb |
onfido-1.1.0 | lib/onfido/resources/document.rb |
onfido-1.0.0 | lib/onfido/resources/document.rb |