Class: GetMocksMockIDCallLogsResponse500

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



11094
11095
11096
11097
11098
11099
# File 'lib/schemas.rb', line 11094

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? GetMocksMockIDCallLogsResponse500Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



11101
11102
11103
# File 'lib/schemas.rb', line 11101

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

Instance Method Details

#to_dynamicObject



11105
11106
11107
11108
11109
# File 'lib/schemas.rb', line 11105

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



11111
11112
11113
# File 'lib/schemas.rb', line 11111

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