Class: DeleteMocksMockIDUnpublishResponse500Error

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



3141
3142
3143
3144
3145
3146
3147
# File 'lib/schemas.rb', line 3141

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

.from_json!(json) ⇒ Object



3149
3150
3151
# File 'lib/schemas.rb', line 3149

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

Instance Method Details

#to_dynamicObject



3153
3154
3155
3156
3157
3158
# File 'lib/schemas.rb', line 3153

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

#to_json(options = nil) ⇒ Object



3160
3161
3162
# File 'lib/schemas.rb', line 3160

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