Class: DeleteMocksMockIDResponseMock

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



2184
2185
2186
2187
2188
2189
2190
# File 'lib/schemas.rb', line 2184

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    id:  d["id"],
    uid: d["uid"],
  )
end

.from_json!(json) ⇒ Object



2192
2193
2194
# File 'lib/schemas.rb', line 2192

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

Instance Method Details

#to_dynamicObject



2196
2197
2198
2199
2200
2201
# File 'lib/schemas.rb', line 2196

def to_dynamic
  {
    "id"  => id,
    "uid" => uid,
  }
end

#to_json(options = nil) ⇒ Object



2203
2204
2205
# File 'lib/schemas.rb', line 2203

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