Class: WorkOS::Connection
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::Connection
- Defined in:
- lib/workos/sso/connection.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, organization_id: :organization_id, connection_type: :connection_type, name: :name, state: :state, status: :status, domains: :domains, options: :options, created_at: :created_at, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#connection_type ⇒ Object
Returns the value of attribute connection_type.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#options ⇒ Object
Returns the value of attribute options.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#state ⇒ Object
Returns the value of attribute state.
-
#status ⇒ Object
deprecated
Deprecated.
Deprecated. Use ‘state` instead.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ Connection
constructor
A new instance of Connection.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ Connection
Returns a new instance of Connection.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/workos/sso/connection.rb', line 43 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @organization_id = hash[:organization_id] @connection_type = hash[:connection_type] @name = hash[:name] @state = hash[:state] @status = hash[:status] @domains = (hash[:domains] || []).map { |item| item ? WorkOS::ConnectionDomain.new(item) : nil } @options = hash[:options] ? WorkOS::ConnectionOption.new(hash[:options]) : nil @created_at = hash[:created_at] @updated_at = hash[:updated_at] end |
Instance Attribute Details
#connection_type ⇒ Object
Returns the value of attribute connection_type.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def connection_type @connection_type end |
#created_at ⇒ Object
Returns the value of attribute created_at.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def created_at @created_at end |
#domains ⇒ Object
Returns the value of attribute domains.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def domains @domains end |
#id ⇒ Object
Returns the value of attribute id.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def object @object end |
#options ⇒ Object
Returns the value of attribute options.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def @options end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def organization_id @organization_id end |
#state ⇒ Object
Returns the value of attribute state.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def state @state end |
#status ⇒ Object
Deprecated. Use ‘state` instead.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/workos/sso/connection.rb', line 24 attr_accessor \ :object, :id, :organization_id, :connection_type, :name, :state, :domains, :options, :created_at, :updated_at |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
24 25 26 |
# File 'lib/workos/sso/connection.rb', line 24 def updated_at @updated_at end |