Class: SecretsGetRequest

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



1132
1133
1134
1135
1136
1137
# File 'lib/schemas.rb', line 1132

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

.from_json!(json) ⇒ Object



1139
1140
1141
# File 'lib/schemas.rb', line 1139

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

Instance Method Details

#to_dynamicObject



1143
1144
1145
1146
1147
# File 'lib/schemas.rb', line 1143

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

#to_json(options = nil) ⇒ Object



1149
1150
1151
# File 'lib/schemas.rb', line 1149

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