Class: WorkOS::ApiKeyWithValue
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ApiKeyWithValue
- Defined in:
- lib/workos/api_keys/api_key_with_value.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, owner: :owner, name: :name, obfuscated_value: :obfuscated_value, last_used_at: :last_used_at, permissions: :permissions, created_at: :created_at, updated_at: :updated_at, value: :value }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_used_at ⇒ Object
Returns the value of attribute last_used_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#obfuscated_value ⇒ Object
Returns the value of attribute obfuscated_value.
-
#object ⇒ Object
Returns the value of attribute object.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ApiKeyWithValue
constructor
A new instance of ApiKeyWithValue.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ ApiKeyWithValue
Returns a new instance of ApiKeyWithValue.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 32 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @owner = hash[:owner] ? WorkOS::ApiKeyWithValueOwner.new(hash[:owner]) : nil @name = hash[:name] @obfuscated_value = hash[:obfuscated_value] @last_used_at = hash[:last_used_at] @permissions = hash[:permissions] || [] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @value = hash[:value] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def id @id end |
#last_used_at ⇒ Object
Returns the value of attribute last_used_at.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def last_used_at @last_used_at end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def name @name end |
#obfuscated_value ⇒ Object
Returns the value of attribute obfuscated_value.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def @obfuscated_value end |
#object ⇒ Object
Returns the value of attribute object.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def object @object end |
#owner ⇒ Object
Returns the value of attribute owner.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def owner @owner end |
#permissions ⇒ Object
Returns the value of attribute permissions.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def @permissions end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def updated_at @updated_at end |
#value ⇒ Object
Returns the value of attribute value.
20 21 22 |
# File 'lib/workos/api_keys/api_key_with_value.rb', line 20 def value @value end |