Class: Cadenya::Types::APIKeyInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(created_by: nil) ⇒ APIKeyInfo

Returns a new instance of APIKeyInfo.



149
150
151
# File 'lib/cadenya/types.rb', line 149

def initialize(created_by: nil)
  @created_by = created_by
end

Instance Attribute Details

#created_byObject (readonly)

Returns the value of attribute created_by.



147
148
149
# File 'lib/cadenya/types.rb', line 147

def created_by
  @created_by
end

Class Method Details

.from_json(data) ⇒ Object



153
154
155
156
157
# File 'lib/cadenya/types.rb', line 153

def self.from_json(data)
  new(
    created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
  )
end

Instance Method Details

#to_hObject



159
160
161
162
163
# File 'lib/cadenya/types.rb', line 159

def to_h
  {
    created_by: Util.plain(@created_by),
  }.reject { |_k, v| v.nil? }
end