Class: GetMocksMockIDCallLogsResponseCallLogsItemRequestBody

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



10513
10514
10515
10516
10517
10518
10519
# File 'lib/schemas.rb', line 10513

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    data: d["data"],
    mode: d["mode"],
  )
end

.from_json!(json) ⇒ Object



10521
10522
10523
# File 'lib/schemas.rb', line 10521

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

Instance Method Details

#to_dynamicObject



10525
10526
10527
10528
10529
10530
# File 'lib/schemas.rb', line 10525

def to_dynamic
  {
    "data" => data,
    "mode" => mode,
  }
end

#to_json(options = nil) ⇒ Object



10532
10533
10534
# File 'lib/schemas.rb', line 10532

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