Class: PutCollectionsCollectionIDFoldersFolderIDResponse404Error

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



29969
29970
29971
29972
29973
29974
29975
29976
# File 'lib/schemas.rb', line 29969

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

.from_json!(json) ⇒ Object



29978
29979
29980
# File 'lib/schemas.rb', line 29978

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

Instance Method Details

#to_dynamicObject



29982
29983
29984
29985
29986
29987
29988
# File 'lib/schemas.rb', line 29982

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

#to_json(options = nil) ⇒ Object



29990
29991
29992
# File 'lib/schemas.rb', line 29990

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