Class: WorkOS::DirectoryGroup
- Inherits:
-
DeprecatedHashWrapper
- Object
- Hash
- DeprecatedHashWrapper
- WorkOS::DirectoryGroup
- Includes:
- HashProvider
- Defined in:
- lib/workos/directory_group.rb
Overview
The DirectoryGroup class provides a lightweight wrapper around a WorkOS DirectoryGroup resource. This class is not meant to be instantiated in user space, and is instantiated internally but exposed.
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#directory_id ⇒ Object
Returns the value of attribute directory_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#idp_id ⇒ Object
Returns the value of attribute idp_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#raw_attributes ⇒ Object
Returns the value of attribute raw_attributes.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(json) ⇒ DirectoryGroup
constructor
A new instance of DirectoryGroup.
- #to_json ⇒ Object
Methods included from HashProvider
Methods inherited from DeprecatedHashWrapper
Constructor Details
#initialize(json) ⇒ DirectoryGroup
Returns a new instance of DirectoryGroup.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/workos/directory_group.rb', line 13 def initialize(json) hash = JSON.parse(json, symbolize_names: true) @id = hash[:id] @directory_id = hash[:directory_id] @organization_id = hash[:organization_id] @idp_id = hash[:idp_id] @name = hash[:name] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @raw_attributes = hash[:raw_attributes] replace_without_warning(to_json) end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def created_at @created_at end |
#directory_id ⇒ Object
Returns the value of attribute directory_id.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def directory_id @directory_id end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def id @id end |
#idp_id ⇒ Object
Returns the value of attribute idp_id.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def idp_id @idp_id end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def name @name end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def organization_id @organization_id end |
#raw_attributes ⇒ Object
Returns the value of attribute raw_attributes.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def raw_attributes @raw_attributes end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/workos/directory_group.rb', line 10 def updated_at @updated_at end |
Instance Method Details
#to_json ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/workos/directory_group.rb', line 28 def to_json(*) { id: id, directory_id: directory_id, organization_id: organization_id, idp_id: idp_id, name: name, created_at: created_at, updated_at: updated_at, raw_attributes: raw_attributes, } end |