Class: Rafflesia::ApiKeyInfo

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/api_keys/api_key_info.rb

Constant Summary collapse

HASH_ATTRS =
{
  created_at: :created_at,
  description: :description,
  environment_id: :environment_id,
  environment_name: :environment_name,
  environment_type: :environment_type,
  expires_at: :expires_at,
  id: :id,
  is_active: :is_active,
  key_prefix: :key_prefix,
  last_used_at: :last_used_at,
  name: :name,
  organization_id: :organization_id,
  revoked_at: :revoked_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ApiKeyInfo

Returns a new instance of ApiKeyInfo.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @created_at = hash[:created_at]
  @description = hash[:description]
  @environment_id = hash[:environment_id]
  @environment_name = hash[:environment_name]
  @environment_type = hash[:environment_type]
  @expires_at = hash[:expires_at]
  @id = hash[:id]
  @is_active = hash[:is_active]
  @key_prefix = hash[:key_prefix]
  @last_used_at = hash[:last_used_at]
  @name = hash[:name]
  @organization_id = hash[:organization_id]
  @revoked_at = hash[:revoked_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def description
  @description
end

#environment_idObject

Returns the value of attribute environment_id.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def environment_id
  @environment_id
end

#environment_nameObject

Returns the value of attribute environment_name.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def environment_name
  @environment_name
end

#environment_typeObject

Returns the value of attribute environment_type.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def environment_type
  @environment_type
end

#expires_atObject

Returns the value of attribute expires_at.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def expires_at
  @expires_at
end

#idObject

Returns the value of attribute id.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def id
  @id
end

#is_activeObject

Returns the value of attribute is_active.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def is_active
  @is_active
end

#key_prefixObject

Returns the value of attribute key_prefix.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def key_prefix
  @key_prefix
end

#last_used_atObject

Returns the value of attribute last_used_at.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def last_used_at
  @last_used_at
end

#nameObject

Returns the value of attribute name.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def name
  @name
end

#organization_idObject

Returns the value of attribute organization_id.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def organization_id
  @organization_id
end

#revoked_atObject

Returns the value of attribute revoked_at.



24
25
26
# File 'lib/rafflesia/api_keys/api_key_info.rb', line 24

def revoked_at
  @revoked_at
end