Class: DeleteSecretResponse

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



1254
1255
1256
1257
1258
1259
# File 'lib/schemas.rb', line 1254

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

.from_json!(json) ⇒ Object



1261
1262
1263
# File 'lib/schemas.rb', line 1261

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

Instance Method Details

#to_dynamicObject



1265
1266
1267
1268
1269
# File 'lib/schemas.rb', line 1265

def to_dynamic
  {
    "secret" => secret.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



1271
1272
1273
# File 'lib/schemas.rb', line 1271

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