Class: DeleteCollectionsCollectionIDFoldersFolderIDResponse401Error

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



812
813
814
815
816
817
818
819
# File 'lib/schemas.rb', line 812

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

.from_json!(json) ⇒ Object



821
822
823
# File 'lib/schemas.rb', line 821

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

Instance Method Details

#to_dynamicObject



825
826
827
828
829
830
831
# File 'lib/schemas.rb', line 825

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

#to_json(options = nil) ⇒ Object



833
834
835
# File 'lib/schemas.rb', line 833

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