class Round::Application

Public Class Methods

hash_identifier() click to toggle source
# File lib/round/application.rb, line 30
def self.hash_identifier
  'name'
end

Public Instance Methods

account_from_key(user_key, account_key) click to toggle source
# File lib/round/application.rb, line 26
def account_from_key(user_key, account_key)
  user_from_key(user_key).accounts.detect { |a| a.key == account_key }
end
authorize_instance(name) click to toggle source
# File lib/round/application.rb, line 10
def authorize_instance(name)
  @resource.authorize_instance(name: name)
end
get_mfa() click to toggle source
# File lib/round/application.rb, line 38
def get_mfa
  @totp.now
end
reset(*resets) click to toggle source
# File lib/round/application.rb, line 47
def reset(*resets)
  @resource.reset(resets)
  self
end
totp=(totp_secret) click to toggle source
# File lib/round/application.rb, line 34
def totp=(totp_secret)
  @totp = ROTP::TOTP.new(totp_secret)
end
user_from_key(key) click to toggle source
# File lib/round/application.rb, line 22
def user_from_key(key)
  users.detect { |u| u.key == key }
end
wallets() click to toggle source
# File lib/round/application.rb, line 14
def wallets
  Round::WalletCollection.new(
    resource: @resource.wallets,
    client: @client,
    application: self
  )
end
with_mfa!(token) click to toggle source
# File lib/round/application.rb, line 42
def with_mfa!(token)
  context.mfa_token = token
  self
end