Class: Cadenya::Types::CreateObjectiveRequest_Secret

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(name: nil, value: nil) ⇒ CreateObjectiveRequest_Secret

Returns a new instance of CreateObjectiveRequest_Secret.



1756
1757
1758
1759
# File 'lib/cadenya/types.rb', line 1756

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



1754
1755
1756
# File 'lib/cadenya/types.rb', line 1754

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



1754
1755
1756
# File 'lib/cadenya/types.rb', line 1754

def value
  @value
end

Class Method Details

.from_json(data) ⇒ Object



1761
1762
1763
1764
1765
1766
# File 'lib/cadenya/types.rb', line 1761

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

Instance Method Details

#to_hObject



1768
1769
1770
1771
1772
1773
# File 'lib/cadenya/types.rb', line 1768

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