Class: PostImportOpenapiResponse401Error

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



23637
23638
23639
23640
23641
23642
23643
# File 'lib/schemas.rb', line 23637

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

.from_json!(json) ⇒ Object



23645
23646
23647
# File 'lib/schemas.rb', line 23645

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

Instance Method Details

#to_dynamicObject



23649
23650
23651
23652
23653
23654
# File 'lib/schemas.rb', line 23649

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

#to_json(options = nil) ⇒ Object



23656
23657
23658
# File 'lib/schemas.rb', line 23656

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