Class: GetMocksMockIDCallLogsResponse401Error

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



10916
10917
10918
10919
10920
10921
10922
# File 'lib/schemas.rb', line 10916

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

.from_json!(json) ⇒ Object



10924
10925
10926
# File 'lib/schemas.rb', line 10924

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

Instance Method Details

#to_dynamicObject



10928
10929
10930
10931
10932
10933
# File 'lib/schemas.rb', line 10928

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

#to_json(options = nil) ⇒ Object



10935
10936
10937
# File 'lib/schemas.rb', line 10935

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