Class: WorkOS::UserApiKeyWithValue
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::UserApiKeyWithValue
- Defined in:
- lib/workos/user_management/user_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, expires_at: :expires_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.
-
#expires_at ⇒ Object
Returns the value of attribute expires_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) ⇒ UserApiKeyWithValue
constructor
A new instance of UserApiKeyWithValue.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ UserApiKeyWithValue
Returns a new instance of UserApiKeyWithValue.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 34 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @owner = hash[:owner] ? WorkOS::UserApiKeyWithValueOwner.new(hash[:owner]) : nil @name = hash[:name] @obfuscated_value = hash[:obfuscated_value] @last_used_at = hash[:last_used_at] @expires_at = hash[:expires_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.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def created_at @created_at end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def expires_at @expires_at end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def id @id end |
#last_used_at ⇒ Object
Returns the value of attribute last_used_at.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def last_used_at @last_used_at end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def name @name end |
#obfuscated_value ⇒ Object
Returns the value of attribute obfuscated_value.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def @obfuscated_value end |
#object ⇒ Object
Returns the value of attribute object.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def object @object end |
#owner ⇒ Object
Returns the value of attribute owner.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def owner @owner end |
#permissions ⇒ Object
Returns the value of attribute permissions.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def @permissions end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def updated_at @updated_at end |
#value ⇒ Object
Returns the value of attribute value.
21 22 23 |
# File 'lib/workos/user_management/user_api_key_with_value.rb', line 21 def value @value end |