Sha256: 87b505194edf1201170672975a463da468ef59da9a3eaf8bd9a34d354eedcbf2
Contents?: true
Size: 668 Bytes
Versions: 12
Compression:
Stored size: 668 Bytes
Contents
# frozen_string_literal: true module Trusona module Workers # ## Finds user identifers class UserIdentifierFinder def initialize(service: nil) @service = service || Trusona::Services::UserIdentifiersService.new end def find(opts) raise ArgumentError, 'Missing user identifier' unless contains_required_arguments(opts) @service.get(build_resource(opts)) end private def contains_required_arguments(opts) opts[:identifier] || opts['identifier'] end def build_resource(options) Trusona::Resources::UserIdentifier.new(options) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems