Class: GetMocksMockIDCallLogsResponse400Error

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



10859
10860
10861
10862
10863
10864
10865
# File 'lib/schemas.rb', line 10859

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

.from_json!(json) ⇒ Object



10867
10868
10869
# File 'lib/schemas.rb', line 10867

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

Instance Method Details

#to_dynamicObject



10871
10872
10873
10874
10875
10876
# File 'lib/schemas.rb', line 10871

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

#to_json(options = nil) ⇒ Object



10878
10879
10880
# File 'lib/schemas.rb', line 10878

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