Class: PutCollectionsCollectionIDResponse400Error

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



30621
30622
30623
30624
30625
30626
30627
30628
# File 'lib/schemas.rb', line 30621

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

.from_json!(json) ⇒ Object



30630
30631
30632
# File 'lib/schemas.rb', line 30630

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

Instance Method Details

#to_dynamicObject



30634
30635
30636
30637
30638
30639
30640
# File 'lib/schemas.rb', line 30634

def to_dynamic
  {
    "details" => details,
    "message" => message,
    "name"    => put_collections_collection_id_response400_error_name,
  }
end

#to_json(options = nil) ⇒ Object



30642
30643
30644
# File 'lib/schemas.rb', line 30642

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