Class: GetMocksMockIDCallLogsResponseCallLogsItemRequestHeaders

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



10545
10546
10547
10548
10549
10550
10551
# File 'lib/schemas.rb', line 10545

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

.from_json!(json) ⇒ Object



10553
10554
10555
# File 'lib/schemas.rb', line 10553

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

Instance Method Details

#to_dynamicObject



10557
10558
10559
10560
10561
10562
# File 'lib/schemas.rb', line 10557

def to_dynamic
  {
    "key"   => key,
    "value" => value,
  }
end

#to_json(options = nil) ⇒ Object



10564
10565
10566
# File 'lib/schemas.rb', line 10564

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