Class: Cadenya::Types::TenantAssertion

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(id: nil, name: nil) ⇒ TenantAssertion

Returns a new instance of TenantAssertion.



5530
5531
5532
5533
# File 'lib/cadenya/types.rb', line 5530

def initialize(id: nil, name: nil)
  @id = id
  @name = name
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



5528
5529
5530
# File 'lib/cadenya/types.rb', line 5528

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5528
5529
5530
# File 'lib/cadenya/types.rb', line 5528

def name
  @name
end

Class Method Details

.from_json(data) ⇒ Object



5535
5536
5537
5538
5539
5540
# File 'lib/cadenya/types.rb', line 5535

def self.from_json(data)
  new(
    id: data["id"],
    name: data["name"],
  )
end

Instance Method Details

#to_hObject



5542
5543
5544
5545
5546
5547
# File 'lib/cadenya/types.rb', line 5542

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