Sha256: 3b9729f6b5571c758bec954541a13195f7609f78762baf7efe52a06ca6ad4679
Contents?: true
Size: 662 Bytes
Versions: 4
Compression:
Stored size: 662 Bytes
Contents
# frozen_string_literal: true module Trusona module Workers # ## Handles finding Identity Documents class IdentityDocumentFinder def initialize(service: nil) @service = service || Trusona::Services::IdentityDocumentsService.new end def find_all(user_identifier = nil) raise(ArgumentError, 'A user identifier is required.') unless user_identifier @service.index(user_identifier) end def find(id = nil) raise(ArgumentError, 'An Identity Document id is required.') unless id @service.get(Trusona::Resources::IdentityDocument.new(id: id)) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems