Class: SecretGetRequest
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- SecretGetRequest
- Defined in:
- lib/schemas.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_dynamic!(d) ⇒ Object
1003 1004 1005 1006 1007 1008 |
# File 'lib/schemas.rb', line 1003 def self.from_dynamic!(d) d = Types::Hash[d] new( id: d.fetch("id"), ) end |
.from_json!(json) ⇒ Object
1010 1011 1012 |
# File 'lib/schemas.rb', line 1010 def self.from_json!(json) from_dynamic!(JSON.parse(json)) end |
Instance Method Details
#to_dynamic ⇒ Object
1014 1015 1016 1017 1018 |
# File 'lib/schemas.rb', line 1014 def to_dynamic { "id" => id, } end |
#to_json(options = nil) ⇒ Object
1020 1021 1022 |
# File 'lib/schemas.rb', line 1020 def to_json( = nil) JSON.generate(to_dynamic, ) end |