Class: DeleteMocksMockIDResponse400Error

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



2243
2244
2245
2246
2247
2248
2249
# File 'lib/schemas.rb', line 2243

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

.from_json!(json) ⇒ Object



2251
2252
2253
# File 'lib/schemas.rb', line 2251

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

Instance Method Details

#to_dynamicObject



2255
2256
2257
2258
2259
2260
# File 'lib/schemas.rb', line 2255

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

#to_json(options = nil) ⇒ Object



2262
2263
2264
# File 'lib/schemas.rb', line 2262

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