class Trusona::TruCode
A scannable, pairable TruCode
to assist magic logins
Public Class Methods
create(code)
click to toggle source
# File lib/trusona/tru_code.rb, line 23 def self.create(code) Trusona::Workers::TruCodeCreator.new.create(code) end
find(id)
click to toggle source
Finds a TruCode
using its ID
@param id [String] The id of the TruCode
we're looking for @return [Trusona::Resources::TruCode] The found TruCode
@raise [Trusona::ResourceNotFoundError] if the TruCode
cannot be found @raise [Trusona::BadRequestError] if the request is improperly formatted @raise [Trusona::UnauthorizedRequestError] if the request is unauthorized.
Typically the result of invalid or revoked Trusona SDK keys.
@raise [Trusona::ApiError] if the Trusona
API is experiencing problems. @raise [ArgumentError] if the TruCode
id is missing
# File lib/trusona/tru_code.rb, line 19 def self.find(id) Trusona::Workers::TruCodeFinder.new.find(id) end