Class: GetAuditLogsResponseTrailsItemDataTeam

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



6942
6943
6944
6945
6946
6947
6948
# File 'lib/schemas.rb', line 6942

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    id:                                                 d["id"],
    get_audit_logs_response_trails_item_data_team_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



6950
6951
6952
# File 'lib/schemas.rb', line 6950

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



6954
6955
6956
6957
6958
6959
# File 'lib/schemas.rb', line 6954

def to_dynamic
  {
    "id"   => id,
    "name" => get_audit_logs_response_trails_item_data_team_name,
  }
end

#to_json(options = nil) ⇒ Object



6961
6962
6963
# File 'lib/schemas.rb', line 6961

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end