Class: GetMocksMockIDCallLogsResponseCallLogsItemResponseHeaders

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



10681
10682
10683
10684
10685
10686
10687
10688
# File 'lib/schemas.rb', line 10681

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

.from_json!(json) ⇒ Object



10690
10691
10692
# File 'lib/schemas.rb', line 10690

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

Instance Method Details

#to_dynamicObject



10694
10695
10696
10697
10698
10699
10700
# File 'lib/schemas.rb', line 10694

def to_dynamic
  {
    "description" => description&.to_dynamic,
    "key"         => key,
    "value"       => value,
  }
end

#to_json(options = nil) ⇒ Object



10702
10703
10704
# File 'lib/schemas.rb', line 10702

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