Class: GetCollectionsCollectionIDFoldersFolderIDResponse401Error

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



7430
7431
7432
7433
7434
7435
7436
7437
# File 'lib/schemas.rb', line 7430

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

.from_json!(json) ⇒ Object



7439
7440
7441
# File 'lib/schemas.rb', line 7439

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

Instance Method Details

#to_dynamicObject



7443
7444
7445
7446
7447
7448
7449
# File 'lib/schemas.rb', line 7443

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

#to_json(options = nil) ⇒ Object



7451
7452
7453
# File 'lib/schemas.rb', line 7451

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