Class: PatchCollectionsCollectionIDResponse403Error

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



18159
18160
18161
18162
18163
18164
18165
# File 'lib/schemas.rb', line 18159

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

.from_json!(json) ⇒ Object



18167
18168
18169
# File 'lib/schemas.rb', line 18167

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

Instance Method Details

#to_dynamicObject



18171
18172
18173
18174
18175
18176
# File 'lib/schemas.rb', line 18171

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

#to_json(options = nil) ⇒ Object



18178
18179
18180
# File 'lib/schemas.rb', line 18178

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