Class: WorkOS::ObjectWithoutValue
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ObjectWithoutValue
- Defined in:
- lib/workos/vault/object_without_value.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, metadata: :metadata, name: :name }.freeze
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectWithoutValue
constructor
A new instance of ObjectWithoutValue.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ ObjectWithoutValue
Returns a new instance of ObjectWithoutValue.
18 19 20 21 22 23 |
# File 'lib/workos/vault/object_without_value.rb', line 18 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @metadata = hash[:metadata] ? WorkOS::ObjectMetadata.new(hash[:metadata]) : nil @name = hash[:name] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
13 14 15 |
# File 'lib/workos/vault/object_without_value.rb', line 13 def id @id end |
#metadata ⇒ Object
Returns the value of attribute metadata.
13 14 15 |
# File 'lib/workos/vault/object_without_value.rb', line 13 def @metadata end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/workos/vault/object_without_value.rb', line 13 def name @name end |