Class: PutCollectionsCollectionIDResponse400

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



30650
30651
30652
30653
30654
30655
# File 'lib/schemas.rb', line 30650

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

.from_json!(json) ⇒ Object



30657
30658
30659
# File 'lib/schemas.rb', line 30657

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

Instance Method Details

#to_dynamicObject



30661
30662
30663
30664
30665
# File 'lib/schemas.rb', line 30661

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

#to_json(options = nil) ⇒ Object



30667
30668
30669
# File 'lib/schemas.rb', line 30667

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