Class: Cadenya::Types::ObjectiveEventData_Finalized

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(type: nil, finalized: nil) ⇒ ObjectiveEventData_Finalized

Returns a new instance of ObjectiveEventData_Finalized.



8872
8873
8874
8875
# File 'lib/cadenya/types.rb', line 8872

def initialize(type: nil, finalized: nil)
  @type = type
  @finalized = finalized
end

Instance Attribute Details

#finalizedObject (readonly)

Returns the value of attribute finalized.



8870
8871
8872
# File 'lib/cadenya/types.rb', line 8870

def finalized
  @finalized
end

#typeObject (readonly)

Returns the value of attribute type.



8870
8871
8872
# File 'lib/cadenya/types.rb', line 8870

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8877
8878
8879
8880
8881
8882
# File 'lib/cadenya/types.rb', line 8877

def self.from_json(data)
  new(
    type: data["type"],
    finalized: data["finalized"].nil? ? nil : Types::ObjectiveFinalized.from_json(data["finalized"]),
  )
end

Instance Method Details

#to_hObject



8884
8885
8886
8887
8888
8889
# File 'lib/cadenya/types.rb', line 8884

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