Class: DeleteCollectionsCollectionIDResponseCollection

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



1316
1317
1318
1319
1320
1321
1322
# File 'lib/schemas.rb', line 1316

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

.from_json!(json) ⇒ Object



1324
1325
1326
# File 'lib/schemas.rb', line 1324

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

Instance Method Details

#to_dynamicObject



1328
1329
1330
1331
1332
1333
# File 'lib/schemas.rb', line 1328

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

#to_json(options = nil) ⇒ Object



1335
1336
1337
# File 'lib/schemas.rb', line 1335

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