Class: PatchCollectionsCollectionIDResponse400

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



18072
18073
18074
18075
18076
18077
# File 'lib/schemas.rb', line 18072

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? PatchCollectionsCollectionIDResponse400Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



18079
18080
18081
# File 'lib/schemas.rb', line 18079

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

Instance Method Details

#to_dynamicObject



18083
18084
18085
18086
18087
# File 'lib/schemas.rb', line 18083

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



18089
18090
18091
# File 'lib/schemas.rb', line 18089

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