Class: PostSecurityAPIValidationResponse

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



27172
27173
27174
27175
27176
27177
# File 'lib/schemas.rb', line 27172

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

.from_json!(json) ⇒ Object



27179
27180
27181
# File 'lib/schemas.rb', line 27179

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

Instance Method Details

#to_dynamicObject



27183
27184
27185
27186
27187
# File 'lib/schemas.rb', line 27183

def to_dynamic
  {
    "warnings" => warnings,
  }
end

#to_json(options = nil) ⇒ Object



27189
27190
27191
# File 'lib/schemas.rb', line 27189

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