Class: PutCollectionsCollectionIDFoldersFolderIDResponse401Error

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



29870
29871
29872
29873
29874
29875
29876
29877
# File 'lib/schemas.rb', line 29870

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

.from_json!(json) ⇒ Object



29879
29880
29881
# File 'lib/schemas.rb', line 29879

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

Instance Method Details

#to_dynamicObject



29883
29884
29885
29886
29887
29888
29889
# File 'lib/schemas.rb', line 29883

def to_dynamic
  {
    "details" => details&.to_dynamic,
    "message" => message,
    "name"    => put_collections_collection_id_folders_folder_id_response401_error_name,
  }
end

#to_json(options = nil) ⇒ Object



29891
29892
29893
# File 'lib/schemas.rb', line 29891

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