Class: DeleteMocksMockIDResponse401Error

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



2300
2301
2302
2303
2304
2305
2306
# File 'lib/schemas.rb', line 2300

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

.from_json!(json) ⇒ Object



2308
2309
2310
# File 'lib/schemas.rb', line 2308

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

Instance Method Details

#to_dynamicObject



2312
2313
2314
2315
2316
2317
# File 'lib/schemas.rb', line 2312

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

#to_json(options = nil) ⇒ Object



2319
2320
2321
# File 'lib/schemas.rb', line 2319

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