Class: GetCollectionsCollectionIDResponse500Error

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



8209
8210
8211
8212
8213
8214
8215
# File 'lib/schemas.rb', line 8209

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

.from_json!(json) ⇒ Object



8217
8218
8219
# File 'lib/schemas.rb', line 8217

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

Instance Method Details

#to_dynamicObject



8221
8222
8223
8224
8225
8226
# File 'lib/schemas.rb', line 8221

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

#to_json(options = nil) ⇒ Object



8228
8229
8230
# File 'lib/schemas.rb', line 8228

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