Class: Cadenya::Types::CreateWidgetSessionRequest_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) ⇒ CreateWidgetSessionRequest_Secret

Returns a new instance of CreateWidgetSessionRequest_Secret.



1993
1994
1995
1996
# File 'lib/cadenya/types.rb', line 1993

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



1991
1992
1993
# File 'lib/cadenya/types.rb', line 1991

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



1991
1992
1993
# File 'lib/cadenya/types.rb', line 1991

def value
  @value
end

Class Method Details

.from_json(data) ⇒ Object



1998
1999
2000
2001
2002
2003
# File 'lib/cadenya/types.rb', line 1998

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

Instance Method Details

#to_hObject



2005
2006
2007
2008
2009
2010
# File 'lib/cadenya/types.rb', line 2005

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