Class: PostSecurityAPIValidationResponse500Error

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



27348
27349
27350
27351
27352
27353
27354
# File 'lib/schemas.rb', line 27348

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

.from_json!(json) ⇒ Object



27356
27357
27358
# File 'lib/schemas.rb', line 27356

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

Instance Method Details

#to_dynamicObject



27360
27361
27362
27363
27364
27365
# File 'lib/schemas.rb', line 27360

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

#to_json(options = nil) ⇒ Object



27367
27368
27369
# File 'lib/schemas.rb', line 27367

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