Class: WorkOS::ObjectMetadata
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ObjectMetadata
- Defined in:
- lib/workos/vault/object_metadata.rb
Constant Summary collapse
- HASH_ATTRS =
{ context: :context, environment_id: :environment_id, id: :id, key_id: :key_id, updated_at: :updated_at, updated_by: :updated_by, version_id: :version_id }.freeze
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#environment_id ⇒ Object
Returns the value of attribute environment_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#updated_by ⇒ Object
Returns the value of attribute updated_by.
-
#version_id ⇒ Object
Returns the value of attribute version_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectMetadata
constructor
A new instance of ObjectMetadata.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ ObjectMetadata
Returns a new instance of ObjectMetadata.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/workos/vault/object_metadata.rb', line 26 def initialize(json) hash = self.class.normalize(json) @context = hash[:context] || {} @environment_id = hash[:environment_id] @id = hash[:id] @key_id = hash[:key_id] @updated_at = hash[:updated_at] @updated_by = hash[:updated_by] ? WorkOS::Actor.new(hash[:updated_by]) : nil @version_id = hash[:version_id] end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def context @context end |
#environment_id ⇒ Object
Returns the value of attribute environment_id.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def environment_id @environment_id end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def id @id end |
#key_id ⇒ Object
Returns the value of attribute key_id.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def key_id @key_id end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def updated_at @updated_at end |
#updated_by ⇒ Object
Returns the value of attribute updated_by.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def updated_by @updated_by end |
#version_id ⇒ Object
Returns the value of attribute version_id.
17 18 19 |
# File 'lib/workos/vault/object_metadata.rb', line 17 def version_id @version_id end |