Class: Onfido::LivePhoto
- Defined in:
- lib/onfido/resources/live_photo.rb
Constant Summary
Constants inherited from Resource
Resource::REQUEST_TIMEOUT_HTTP_CODE, Resource::VALID_HTTP_METHODS
Instance Method Summary collapse
- #all(applicant_id) ⇒ Object
-
#create(applicant_id:, file:, **payload) ⇒ Object
with open-uri the file can be a link or an actual file.
- #download(live_photo_id) ⇒ Object
- #find(live_photo_id) ⇒ Object
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Onfido::Resource
Instance Method Details
#all(applicant_id) ⇒ Object
23 24 25 |
# File 'lib/onfido/resources/live_photo.rb', line 23 def all(applicant_id) get(path: "live_photos?applicant_id=#{applicant_id}") end |
#create(applicant_id:, file:, **payload) ⇒ Object
with open-uri the file can be a link or an actual file
7 8 9 10 11 12 13 |
# File 'lib/onfido/resources/live_photo.rb', line 7 def create(applicant_id:, file:, **payload) validate_file!(file) payload[:applicant_id] = applicant_id payload[:file] = file post(path: 'live_photos', payload: payload) end |
#download(live_photo_id) ⇒ Object
19 20 21 |
# File 'lib/onfido/resources/live_photo.rb', line 19 def download(live_photo_id) get(path: "live_photos/#{live_photo_id}/download") end |
#find(live_photo_id) ⇒ Object
15 16 17 |
# File 'lib/onfido/resources/live_photo.rb', line 15 def find(live_photo_id) get(path: "live_photos/#{live_photo_id}") end |