Class: GetMocksMockIDCallLogsResponse500Error

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



11067
11068
11069
11070
11071
11072
11073
# File 'lib/schemas.rb', line 11067

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

.from_json!(json) ⇒ Object



11075
11076
11077
# File 'lib/schemas.rb', line 11075

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

Instance Method Details

#to_dynamicObject



11079
11080
11081
11082
11083
11084
# File 'lib/schemas.rb', line 11079

def to_dynamic
  {
    "message" => message,
    "name"    => get_mocks_mock_id_call_logs_response500_error_name,
  }
end

#to_json(options = nil) ⇒ Object



11086
11087
11088
# File 'lib/schemas.rb', line 11086

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