Class: DeleteCollectionsCollectionIDFoldersFolderIDResponse404Error

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



911
912
913
914
915
916
917
918
# File 'lib/schemas.rb', line 911

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

.from_json!(json) ⇒ Object



920
921
922
# File 'lib/schemas.rb', line 920

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

Instance Method Details

#to_dynamicObject



924
925
926
927
928
929
930
# File 'lib/schemas.rb', line 924

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

#to_json(options = nil) ⇒ Object



932
933
934
# File 'lib/schemas.rb', line 932

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