Class: PatchCollectionsCollectionIDResponse401Error

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



18102
18103
18104
18105
18106
18107
18108
# File 'lib/schemas.rb', line 18102

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

.from_json!(json) ⇒ Object



18110
18111
18112
# File 'lib/schemas.rb', line 18110

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

Instance Method Details

#to_dynamicObject



18114
18115
18116
18117
18118
18119
# File 'lib/schemas.rb', line 18114

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

#to_json(options = nil) ⇒ Object



18121
18122
18123
# File 'lib/schemas.rb', line 18121

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