Sha256: 936b9e7aee45fd9f8242f89e683fb7dc46f105d00a81b4ca33d574dbddbe75a2

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 Bytes

Contents

module Onfido
  class LivePhoto < Resource
    # with open-uri the file can be a link or an actual file

    def create(applicant_id:, file:, **payload)
      validate_file!(file)
      payload[:applicant_id] = applicant_id
      payload[:file] = file

      post(path: 'live_photos', payload: payload)
    end

    def find(live_photo_id)
      get(path: "live_photos/#{live_photo_id}")
    end

    def download(live_photo_id)
      get(path: "live_photos/#{live_photo_id}/download")
    end

    def all(applicant_id)
      get(path: "live_photos?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/live_photo.rb
onfido-1.1.0 lib/onfido/resources/live_photo.rb
onfido-1.0.0 lib/onfido/resources/live_photo.rb