Class: GetCollectionsCollectionIDFoldersFolderIDResponse401

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



7459
7460
7461
7462
7463
7464
# File 'lib/schemas.rb', line 7459

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? GetCollectionsCollectionIDFoldersFolderIDResponse401Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



7466
7467
7468
# File 'lib/schemas.rb', line 7466

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

Instance Method Details

#to_dynamicObject



7470
7471
7472
7473
7474
# File 'lib/schemas.rb', line 7470

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



7476
7477
7478
# File 'lib/schemas.rb', line 7476

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