Class: PutMocksMockIDResponse401Error

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



32660
32661
32662
32663
32664
32665
32666
# File 'lib/schemas.rb', line 32660

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

.from_json!(json) ⇒ Object



32668
32669
32670
# File 'lib/schemas.rb', line 32668

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

Instance Method Details

#to_dynamicObject



32672
32673
32674
32675
32676
32677
# File 'lib/schemas.rb', line 32672

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

#to_json(options = nil) ⇒ Object



32679
32680
32681
# File 'lib/schemas.rb', line 32679

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