Class: GetApisResponse401Error

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



6728
6729
6730
6731
6732
6733
6734
# File 'lib/schemas.rb', line 6728

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    message:                         d["message"],
    get_apis_response401_error_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



6736
6737
6738
# File 'lib/schemas.rb', line 6736

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

Instance Method Details

#to_dynamicObject



6740
6741
6742
6743
6744
6745
# File 'lib/schemas.rb', line 6740

def to_dynamic
  {
    "message" => message,
    "name"    => get_apis_response401_error_name,
  }
end

#to_json(options = nil) ⇒ Object



6747
6748
6749
# File 'lib/schemas.rb', line 6747

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