Class: DeleteCollectionsCollectionIDResponse401Error

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



1375
1376
1377
1378
1379
1380
1381
# File 'lib/schemas.rb', line 1375

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

.from_json!(json) ⇒ Object



1383
1384
1385
# File 'lib/schemas.rb', line 1383

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

Instance Method Details

#to_dynamicObject



1387
1388
1389
1390
1391
1392
# File 'lib/schemas.rb', line 1387

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

#to_json(options = nil) ⇒ Object



1394
1395
1396
# File 'lib/schemas.rb', line 1394

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