Class: DeleteMocksMockIDUnpublishResponse400Error

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



2933
2934
2935
2936
2937
2938
2939
# File 'lib/schemas.rb', line 2933

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

.from_json!(json) ⇒ Object



2941
2942
2943
# File 'lib/schemas.rb', line 2941

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

Instance Method Details

#to_dynamicObject



2945
2946
2947
2948
2949
2950
# File 'lib/schemas.rb', line 2945

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

#to_json(options = nil) ⇒ Object



2952
2953
2954
# File 'lib/schemas.rb', line 2952

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