Class: Cadenya::Types::ToolSetEventData_SyncCompleted

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, sync_completed: nil) ⇒ ToolSetEventData_SyncCompleted

Returns a new instance of ToolSetEventData_SyncCompleted.



7901
7902
7903
7904
# File 'lib/cadenya/types.rb', line 7901

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

Instance Attribute Details

#sync_completedObject (readonly)

Returns the value of attribute sync_completed.



7899
7900
7901
# File 'lib/cadenya/types.rb', line 7899

def sync_completed
  @sync_completed
end

#typeObject (readonly)

Returns the value of attribute type.



7899
7900
7901
# File 'lib/cadenya/types.rb', line 7899

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



7906
7907
7908
7909
7910
7911
# File 'lib/cadenya/types.rb', line 7906

def self.from_json(data)
  new(
    type: data["type"],
    sync_completed: data["syncCompleted"].nil? ? nil : Types::SyncCompleted.from_json(data["syncCompleted"]),
  )
end

Instance Method Details

#to_hObject



7913
7914
7915
7916
7917
7918
# File 'lib/cadenya/types.rb', line 7913

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