Class: PatchCollectionsCollectionIDResponse400Error

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



18045
18046
18047
18048
18049
18050
18051
# File 'lib/schemas.rb', line 18045

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

.from_json!(json) ⇒ Object



18053
18054
18055
# File 'lib/schemas.rb', line 18053

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

Instance Method Details

#to_dynamicObject



18057
18058
18059
18060
18061
18062
# File 'lib/schemas.rb', line 18057

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

#to_json(options = nil) ⇒ Object



18064
18065
18066
# File 'lib/schemas.rb', line 18064

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