Class: DeleteMocksMockIDUnpublishResponse401Error

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



2990
2991
2992
2993
2994
2995
2996
# File 'lib/schemas.rb', line 2990

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

.from_json!(json) ⇒ Object



2998
2999
3000
# File 'lib/schemas.rb', line 2998

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

Instance Method Details

#to_dynamicObject



3002
3003
3004
3005
3006
3007
# File 'lib/schemas.rb', line 3002

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

#to_json(options = nil) ⇒ Object



3009
3010
3011
# File 'lib/schemas.rb', line 3009

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