Class: Cadenya::Types::ObjectiveEventData_ToolApproved

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, tool_approved: nil) ⇒ ObjectiveEventData_ToolApproved

Returns a new instance of ObjectiveEventData_ToolApproved.



8596
8597
8598
8599
# File 'lib/cadenya/types.rb', line 8596

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

Instance Attribute Details

#tool_approvedObject (readonly)

Returns the value of attribute tool_approved.



8594
8595
8596
# File 'lib/cadenya/types.rb', line 8594

def tool_approved
  @tool_approved
end

#typeObject (readonly)

Returns the value of attribute type.



8594
8595
8596
# File 'lib/cadenya/types.rb', line 8594

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



8601
8602
8603
8604
8605
8606
# File 'lib/cadenya/types.rb', line 8601

def self.from_json(data)
  new(
    type: data["type"],
    tool_approved: data["toolApproved"].nil? ? nil : Types::ToolApproved.from_json(data["toolApproved"]),
  )
end

Instance Method Details

#to_hObject



8608
8609
8610
8611
8612
8613
# File 'lib/cadenya/types.rb', line 8608

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