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



1030
1031
1032
1033
1034
1035
# File 'lib/schemas.rb', line 1030

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

.from_json!(json) ⇒ Object



1037
1038
1039
# File 'lib/schemas.rb', line 1037

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

Instance Method Details

#to_dynamicObject



1041
1042
1043
1044
1045
# File 'lib/schemas.rb', line 1041

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

#to_json(options = nil) ⇒ Object



1047
1048
1049
# File 'lib/schemas.rb', line 1047

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