Class: Osso::Models::EnterpriseAccount

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/osso/models/enterprise_account.rb

Overview

Base class for Enterprises. This should map one-to-one with your own Account model. Persisting the EnterpriseAccount id in your application’s database is recommended. The table also includes fields for external IDs such that you can persist your ID for an account in your Osso instance.

Instance Method Summary collapse

Instance Method Details

#providerObject Also known as: identity_provider



20
21
22
23
24
# File 'lib/osso/models/enterprise_account.rb', line 20

def provider
  return nil unless single_provider?

  identity_providers.first
end

#single_provider?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/osso/models/enterprise_account.rb', line 16

def single_provider?
  identity_providers.not_pending.one?
end