Class: PostCollectionsCollectionIDFoldersResponse500

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



20933
20934
20935
20936
20937
20938
20939
20940
# File 'lib/schemas.rb', line 20933

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                                                  d["detail"],
    title:                                                   d["title"],
    post_collections_collection_id_folders_response500_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



20942
20943
20944
# File 'lib/schemas.rb', line 20942

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

Instance Method Details

#to_dynamicObject



20946
20947
20948
20949
20950
20951
20952
# File 'lib/schemas.rb', line 20946

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => post_collections_collection_id_folders_response500_type,
  }
end

#to_json(options = nil) ⇒ Object



20954
20955
20956
# File 'lib/schemas.rb', line 20954

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