Class: DeleteCollectionsCollectionIDResponse404ErrorDetails

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



1432
1433
1434
1435
1436
1437
1438
# File 'lib/schemas.rb', line 1432

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

.from_json!(json) ⇒ Object



1440
1441
1442
# File 'lib/schemas.rb', line 1440

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

Instance Method Details

#to_dynamicObject



1444
1445
1446
1447
1448
1449
# File 'lib/schemas.rb', line 1444

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

#to_json(options = nil) ⇒ Object



1451
1452
1453
# File 'lib/schemas.rb', line 1451

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